}
export interface ComponentCustomElementInterface {
+ /**
+ * @internal
+ */
+ _isVueCE: boolean
/**
* @internal
*/
* @internal attached by the nested Teleport when shadowRoot is false.
*/
_teleportTargets?: Set<RendererElement>
+ /**
+ * @internal check if shadow root is enabled
+ */
+ _hasShadowRoot(): boolean
}
import { isCompatEnabled } from './compat/compatConfig'
import { DeprecationTypes } from './compat/compatConfig'
import { type TransitionHooks, leaveCbKey } from './components/BaseTransition'
-import type { VueElement } from '@vue/runtime-dom'
+import type { ComponentCustomElementInterface } from './component'
export interface Renderer<HostElement = RendererElement> {
render: RootRenderFunction<HostElement>
optimized,
)
} else {
- const customElement = !!(n1.el && (n1.el as VueElement)._isVueCE)
- ? (n1.el as VueElement)
- : null
+ const customElement =
+ n1.el && (n1.el as ComponentCustomElementInterface)._isVueCE
+ ? (n1.el as ComponentCustomElementInterface)
+ : null
try {
if (customElement) {
customElement._beginPatch()
}
} else {
// custom element style injection
- if (
- root.ce &&
- // @ts-expect-error _def is private
- (root.ce as VueElement)._def.shadowRoot !== false
- ) {
+ if (root.ce && root.ce._hasShadowRoot()) {
root.ce._injectChildStyle(type)
}