Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(runtime-core): add 'container' to component instance #8195

Closed
wants to merge 3 commits into from

Conversation

eagleoflqj
Copy link

close #6113

Testcase shows how to use it in setup of a custom element.
If a component aims for both vue component and web component, one can use ins.container instanceof DocumentFragment to distinguish.

@eagleoflqj
Copy link
Author

Hi could someone please review it?

@sxzz sxzz added ready for review This PR requires more reviews version: minor labels Sep 2, 2023
@sxzz sxzz changed the base branch from main to 3.4 September 2, 2023 16:31
@github-actions
Copy link

github-actions bot commented Sep 2, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 85.9 kB (+46 B) 32.7 kB (+10 B) 29.5 kB (+24 B)
vue.global.prod.js 132 kB (+46 B) 49.4 kB (+13 B) 44.3 kB (+10 B)

Usages

Name Size Gzip Brotli
createApp 47.9 kB (+46 B) 18.9 kB (+14 B) 17.2 kB (+17 B)
createSSRApp 50.7 kB (+46 B) 20 kB (+16 B) 18.3 kB (+78 B)
defineCustomElement 50.3 kB (+46 B) 19.7 kB (+14 B) 17.9 kB (+16 B)
overall 61.3 kB (+46 B) 23.7 kB (+16 B) 21.6 kB (+18 B)

@yyx990803
Copy link
Member

I think this specific case should be solved in a more custom-element-specific way, and should also avoid relying on getCurrentInstance().

see 5a1a89b

@yyx990803 yyx990803 closed this Aug 3, 2024
@eagleoflqj eagleoflqj deleted the instance-container branch August 3, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Rejected
Status: Done
Development

Successfully merging this pull request may close these issues.

Access shadowRoot inside defineCustomElement
5 participants