Skip to content

Commit 3a74d19

Browse files
save file
1 parent 2300db4 commit 3a74d19

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

utils/editors/js-console/html/output-console/v3.0/output-console-v3.0.html

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@
177177

178178
root = $(shadow,'#root');
179179

180-
chk.isolate = $.chkbox(shadow,'#isolate',btn.isolate);
180+
chk.isolate = $.chkbox(shadow,'#isolate');
181+
chk.isolate.checked = window.crossOriginIsolated;
181182

182183
chk['allow-modals'] = $.chkbox(shadow,'#allow-modals');
183184
chk['allow-popups'] = $.chkbox(shadow,'#allow-popups');
@@ -209,6 +210,7 @@
209210
//:
210211

211212

213+
/*
212214
btn.isolate = function(chk){
213215
214216
if(chk.checked){
@@ -219,8 +221,9 @@
219221
}
220222
221223
}//isolate
222-
223-
224+
*/
225+
226+
224227
btn.console.clear = function(){
225228
debug('btn.clear');
226229
clear();
@@ -348,7 +351,7 @@
348351
}
349352

350353
var attr = [...tokens].join(' ');
351-
//console.log(attr);
354+
debug(attr);
352355
iframe.setAttribute('sandbox',attr);
353356

354357
}//sandbox
@@ -362,9 +365,15 @@
362365
iframe.onload = onload;
363366

364367
build.sandbox();
368+
365369
iframe.setAttribute('allow',sandbox_allow);
366-
iframe.src = sandbox_url;
367-
debug(sandbox_url);
370+
debug(sandbox_allow);
371+
var src = sandbox_url;
372+
if(chk.isolate.checked){
373+
src += '?isolate';
374+
}
375+
iframe.src = src;
376+
debug(src);
368377
iframe.style.cssText = 'box-sizing:border-box';
369378
if(!chk.iframe.checked){
370379
iframe.style.display = 'none';

0 commit comments

Comments
 (0)