]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(devtools): expose vnode and component on elements
authorGuillaume Chau <guillaume.b.chau@gmail.com>
Sat, 29 Aug 2020 02:53:25 +0000 (04:53 +0200)
committerGuillaume Chau <guillaume.b.chau@gmail.com>
Sat, 29 Aug 2020 02:53:25 +0000 (04:53 +0200)
packages/runtime-core/src/renderer.ts

index 930464ebc61f906a7721c6134e618e01b526c459..ba8c8636c046156814be161f0d8e3e55be2d83fc 100644 (file)
@@ -755,6 +755,10 @@ function baseCreateRenderer(
         hostSetScopeId(el, treeOwnerId + '-s')
       }
     }
+    if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+      el.__vnode = vnode
+      el.__vueParentComponent = parentComponent
+    }
     if (dirs) {
       invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount')
     }