File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
utils/editors/js-console/html/output-console/v3.0 Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 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' ) ;
209210 //:
210211
211212
213+ /*
212214 btn.isolate = function(chk){
213215
214216 if(chk.checked){
219221 }
220222
221223 }//isolate
222-
223-
224+ */
225+
226+
224227 btn . console . clear = function ( ) {
225228 debug ( 'btn.clear' ) ;
226229 clear ( ) ;
348351 }
349352
350353 var attr = [ ...tokens ] . join ( ' ' ) ;
351- //console.log (attr);
354+ debug ( attr ) ;
352355 iframe . setAttribute ( 'sandbox' , attr ) ;
353356
354357 } //sandbox
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' ;
You can’t perform that action at this time.
0 commit comments