diff --git a/docs/iframe.html b/docs/iframe.html index e25a307..2e67e3e 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -77,13 +77,14 @@ /* globals window */ /* eslint-disable no-underscore-dangle */ try { - if (window.parent !== window) { - window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; - window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__; + if (window.top !== window) { + window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.top.__REACT_DEVTOOLS_GLOBAL_HOOK__; + window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.top.__VUE_DEVTOOLS_GLOBAL_HOOK__; + window.top.__VUE_DEVTOOLS_CONTEXT__ = window.document; } } catch (e) { // eslint-disable-next-line no-console - console.warn('unable to connect to parent frame for connecting dev tools'); + console.warn('unable to connect to top frame for connecting dev tools'); } @@ -124,11 +125,11 @@