File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 16
16
mutations . forEach ( ( mutation ) => {
17
17
if ( mutation . type === 'attributes' && mutation . attributeName === 'class' ) {
18
18
const theme = htmlElement . classList . contains ( 'theme-light' ) ? 'light' : 'dark' ;
19
- console . log ( theme )
19
+ // console.log(theme)
20
20
updateIframeThemes ( theme ) ;
21
21
}
22
22
} ) ;
65
65
}
66
66
67
67
function observeIFrame(el) {
68
- console . log ( "el.contentWindow: " + el . contentWindow )
69
- console . log ( "el.contentWindow.document: " + el . contentWindow . document )
70
- console . log ( "el.contentWindow.document.body: " + el . contentWindow . document . body )
71
- console . log ( "el.contentWindow.performance: " + el . contentWindow . performance )
72
- console . log ( "el.contentWindow.performance.timing.loadEventEnd: " + el . contentWindow . performance . timing . loadEventEnd )
68
+ // console.log("el.contentWindow: " + el.contentWindow)
69
+ // console.log("el.contentWindow.document: " + el.contentWindow.document)
70
+ // console.log("el.contentWindow.document.body: " + el.contentWindow.document.body)
71
+ // console.log("el.contentWindow.performance: " + el.contentWindow.performance)
72
+ // console.log("el.contentWindow.performance.timing.loadEventEnd: " + el.contentWindow.performance.timing.loadEventEnd)
73
73
74
74
if ( el . contentWindow && el . contentWindow . performance && el . contentWindow . performance . timing . loadEventEnd === 0 ) {
75
75
console . log ( "ready path" )
99
99
100
100
function traverse ( node ) {
101
101
if ( node . tagName === 'IFRAME' ) {
102
- observeIFrame ( node ) ;
103
- }
102
+ observeIFrame ( node ) ;
103
+ }
104
104
105
- for ( let i = 0 ; i < node . children . length ; i ++ ) {
106
- traverse ( node . children [ i ] ) ;
105
+ for ( let i = 0 ; i < node . children . length ; i ++ ) {
106
+ traverse ( node . children [ i ] ) ;
107
+ }
107
108
}
108
- }
109
109
110
110
traverse ( addedNode ) ;
111
111
}
You can’t perform that action at this time.
0 commit comments