Skip to content

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 force-pushed the instance-container branch from bf6152d to 9bab0a5 Compare September 2, 2023 16:30
@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)

@sxzz sxzz changed the base branch from 3.4 to minor September 21, 2023 11:49
@sxzz sxzz force-pushed the minor branch 2 times, most recently from dc30885 to be91d43 Compare September 22, 2023 08:11
Co-authored-by: 白雾三语 <32354856+baiwusanyu-c@users.noreply.github.com>
@sxzz sxzz force-pushed the minor branch 3 times, most recently from 4a6258b to 5d93a55 Compare October 19, 2023 17:17
@pikax pikax added ready to merge The PR is ready to be merged. and removed ready for review This PR requires more reviews labels Oct 20, 2023
yyx990803 added a commit that referenced this pull request Aug 3, 2024
@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