(vnode: TeleportVNode = n2)
| 129 | } |
| 130 | |
| 131 | const mountToTarget = (vnode: TeleportVNode = n2) => { |
| 132 | const disabled = isTeleportDisabled(vnode.props) |
| 133 | const target = (vnode.target = resolveTarget(vnode.props, querySelector)) |
| 134 | const targetAnchor = prepareAnchor(target, vnode, createText, insert) |
| 135 | if (target) { |
| 136 | // #2652 we could be teleporting from a non-SVG tree into an SVG tree |
| 137 | if (namespace !== 'svg' && isTargetSVG(target)) { |
| 138 | namespace = 'svg' |
| 139 | } else if (namespace !== 'mathml' && isTargetMathML(target)) { |
| 140 | namespace = 'mathml' |
| 141 | } |
| 142 | |
| 143 | // track CE teleport targets |
| 144 | if (parentComponent && parentComponent.isCE) { |
| 145 | ;( |
| 146 | parentComponent.ce!._teleportTargets || |
| 147 | (parentComponent.ce!._teleportTargets = new Set()) |
| 148 | ).add(target) |
| 149 | } |
| 150 | |
| 151 | if (!disabled) { |
| 152 | mount(vnode, target, targetAnchor) |
| 153 | updateCssVars(vnode, false) |
| 154 | } |
| 155 | } else if (__DEV__ && !disabled) { |
| 156 | warn('Invalid Teleport target on mount:', target, `(${typeof target})`) |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | const queuePendingMount = (vnode: TeleportVNode) => { |
| 161 | const mountJob: SchedulerJob = () => { |
no test coverage detected