function getInnerChild(vnode: VNode) {
return vnode.shapeFlag & ShapeFlags.SUSPENSE ? vnode.ssContent! : vnode
}
+
+/**
+ * shared between runtime-core and runtime-vapor
+ */
+export function activate(
+ vnode: VNode,
+ container: RendererElement,
+ anchor: RendererNode | null,
+ { p: patch, m: move }: RendererInternals,
+ parentComponent: ComponentInternalInstance | null,
+ parentSuspense: SuspenseBoundary | null,
+ namespace?: ElementNamespace,
+ optimized?: boolean,
+): void {
+ const instance = vnode.component!
+ move(
+ vnode,
+ container,
+ anchor,
+ MoveType.ENTER,
+ parentComponent,
+ parentSuspense,
+ )
+ // in case props have changed
+ patch(
+ instance.vnode,
+ vnode,
+ container,
+ anchor,
+ instance,
+ parentSuspense,
+ namespace,
+ vnode.slotScopeIds,
+ optimized,
+ )
+ queuePostRenderEffect(() => {
+ instance.isDeactivated = false
+ if (instance.a) {
+ invokeArrayFns(instance.a)
+ }
+ const vnodeHook = vnode.props && vnode.props.onVnodeMounted
+ if (vnodeHook) {
+ invokeVNodeHook(vnodeHook, instance.parent, vnode)
+ }
+ }, parentSuspense)
+
+ if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+ // Update components tree
+ devtoolsComponentAdded(instance)
+ }
+}
+
+/**
+ * shared between runtime-core and runtime-vapor
+ */
+export function deactivate(
+ vnode: VNode,
+ container: RendererElement,
+ { m: move }: RendererInternals,
+ parentComponent: ComponentInternalInstance | null,
+ parentSuspense: SuspenseBoundary | null,
+): void {
+ const instance = vnode.component!
+ invalidateMount(instance.m)
+ invalidateMount(instance.a)
+
+ move(vnode, container, null, MoveType.LEAVE, parentComponent, parentSuspense)
+ queuePostRenderEffect(() => {
+ if (instance.da) {
+ invokeArrayFns(instance.da)
+ }
+ const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted
+ if (vnodeHook) {
+ invokeVNodeHook(vnodeHook, instance.parent, vnode)
+ }
+ instance.isDeactivated = true
+ }, parentSuspense)
+
+ if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+ // Update components tree
+ devtoolsComponentAdded(instance)
+ }
++
++
++ // for e2e test
++ if (__DEV__ && __BROWSER__) {
++ ;(instance as any).__keepAliveStorageContainer = container
++ }
+}