Skip to content

Commit 38ca7e8

Browse files
committed
feat(devtools): expose vnode and component on elements
1 parent 4421c00 commit 38ca7e8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime-core/src/renderer.ts

+4
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,10 @@ function baseCreateRenderer(
755755
hostSetScopeId(el, treeOwnerId + '-s')
756756
}
757757
}
758+
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
759+
el.__vnode = vnode
760+
el.__vueParentComponent = parentComponent
761+
}
758762
if (dirs) {
759763
invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount')
760764
}

0 commit comments

Comments
 (0)