Vue3 custom element does not render below Chrome 65 #9614
Labels
browser specific
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has PR
A pull request has already been submitted to solve the issue
scope: custom elements
Vue version
3.3.4
Link to minimal reproduction
https://vue3-custom-component.vercel.app/
Steps to reproduce
Vue3 custom element (Web Component) does not render below Chrome 65 (Android 8 built-in webview)
see https://github.com/peixin/vue3-custom-component
When
isCustomizedBuiltIn
is false, Vue3 passesundefined
as the second argument todocument.createElement
throughnodeOps.createElement
when the built-in tag name is not used as a custom element. This usage does not work in Chrome versions prior to 66, meaning that theconstructor
andconnectedCallback
of the custom element will not be triggered.Interestingly, starting from version 66, the
constructor
will not be triggered upon creation, but when appended to the DOM, theconstructor
andconnectedCallback
will be triggered in sequence, allowing it to function properly. In the latest version, theconstructor
will be triggered upon creation, and when appended to the DOM, theconnectedCallback
will be triggered.What is expected?
The
custom-element
tag placed in vue template is correctly displayed in page.What is actually happening?
Chrome/65.0.3325.144
Chrome/66.0.3347.0
Chrome/118.0.0.0
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: