Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb621b commit 2248387Copy full SHA for 2248387
packages/shell-host/src/DevIframe.vue
@@ -32,8 +32,19 @@ export default defineComponent({
32
iframe.value.contentDocument.body.appendChild(script)
33
}
34
35
+ let init = false
36
+ let loadListener
37
+
38
39
function onLoad() {
40
loading.value = false
41
+ if (init) {
42
+ if (loadListener) {
43
+ loadListener()
44
+ }
45
+ return
46
47
+ init = true
48
49
if (!iframe.value?.contentWindow) {
50
throw new Error('Cant find iframe contentWindow')
@@ -42,8 +53,6 @@ export default defineComponent({
53
console.log('%cInstalling hook...', 'color:#42B983;')
54
installHook(iframe.value.contentWindow)
55
- let loadListener
-
56
// 2. init devtools
57
console.log('%cInit devtools...', 'color:#42B983;')
58
initDevTools({
0 commit comments