File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/webview/browser/pre Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919( function ( ) {
2020 'use strict' ;
2121
22+ const isSafari = navigator . vendor && navigator . vendor . indexOf ( 'Apple' ) > - 1 &&
23+ navigator . userAgent &&
24+ navigator . userAgent . indexOf ( 'CriOS' ) === - 1 &&
25+ navigator . userAgent . indexOf ( 'FxiOS' ) === - 1 ;
26+
2227 /**
2328 * Use polling to track focus of main webview and iframes within the webview
2429 *
514519 } , 0 ) ;
515520 }
516521
517- if ( host . fakeLoad && false ) {
522+ if ( host . fakeLoad && ! options . allowScripts && isSafari ) {
518523 // On Safari for iframes with scripts disabled, the `DOMContentLoaded` never seems to be fired.
519524 // Use polling instead.
520525 const interval = setInterval ( ( ) => {
524529 return ;
525530 }
526531
527- if ( newFrame . contentDocument . readyState === 'complete ') {
532+ if ( newFrame . contentDocument . readyState !== 'loading ') {
528533 clearInterval ( interval ) ;
529534 onFrameLoaded ( newFrame . contentDocument ) ;
530535 }
You can’t perform that action at this time.
0 commit comments