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

fix(customElement): properly get native attribute value #12125

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edison1105
Copy link
Member

@edison1105 edison1105 commented Oct 8, 2024

close #12124

Copy link

github-actions bot commented Oct 8, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (+67 B) 38.1 kB (+21 B) 34.2 kB (+30 B)
vue.global.prod.js 160 kB (+67 B) 58 kB (+21 B) 51.6 kB (+42 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49.1 kB 18.9 kB 17.3 kB
createApp 55.7 kB 21.4 kB 19.6 kB
createSSRApp 59.7 kB 23.1 kB 21 kB
defineCustomElement 60.5 kB (+67 B) 23 kB (+20 B) 21 kB (+48 B)
overall 69.4 kB 26.5 kB 24.1 kB

Copy link

pkg-pr-new bot commented Oct 8, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@12125

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@12125

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@12125

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@12125

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12125

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@12125

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@12125

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@12125

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@12125

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@12125

vue

pnpm add https://pkg.pr.new/vue@12125

commit: 3b7fd30

@lennartbuit
Copy link

lennartbuit commented Oct 8, 2024

Its not just tagName, its anything from at least Element that is problematic. Like, I can also override hasAttribute.

So can we instead warn when you define a property the object already has?

@edison1105 edison1105 marked this pull request as draft October 8, 2024 08:17
@edison1105 edison1105 changed the title fix(customElement): warn if attribute is tagName fix(customElement): avoid overriding native attribute Oct 8, 2024
@edison1105 edison1105 marked this pull request as ready for review October 8, 2024 12:00
@edison1105 edison1105 changed the title fix(customElement): avoid overriding native attribute fix(customElement): properly get native IDL attribute value Oct 8, 2024
@edison1105 edison1105 changed the title fix(customElement): properly get native IDL attribute value fix(customElement): properly get native attribute value Oct 8, 2024
@edison1105 edison1105 closed this Oct 21, 2024
@edison1105 edison1105 deleted the edison/fix/12124 branch October 21, 2024 07:36
@edison1105 edison1105 restored the edison/fix/12124 branch October 21, 2024 08:32
@edison1105 edison1105 reopened this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

defineCustomElement can accidentally override members of the Element prototype
2 participants