|
@@ -3729,16 +3729,19 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
|
|
|
U.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
|
|
|
})
|
|
|
} else if (str == 'whiteboard') {
|
|
|
- try {
|
|
|
- _iframe.onload = () => {
|
|
|
- _iframe.contentWindow.document.body.appendChild(script1);
|
|
|
- _iframe.contentWindow.document.body.appendChild(script2);
|
|
|
- _iframe.contentWindow.document.body.appendChild(script4);
|
|
|
- U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
|
|
|
- };
|
|
|
- } catch (error) {
|
|
|
+ let onloadListener = _iframe.onload = () => {
|
|
|
+ _iframe.contentWindow.document.body.appendChild(script1);
|
|
|
+ _iframe.contentWindow.document.body.appendChild(script2);
|
|
|
+ _iframe.contentWindow.document.body.appendChild(script4);
|
|
|
U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
|
|
|
- }
|
|
|
+ };
|
|
|
+ if (onloadListener) {
|
|
|
+ // iframe 已经加载完成
|
|
|
+ } else {
|
|
|
+ // iframe 还没有加载完成
|
|
|
+ U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
_iframe.onload = () => {
|
|
|
_iframe.contentWindow.document.body.appendChild(script1);
|