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

[scoped-custom-element-registry] Non-string Values Are Not Properly Stringified Before Calling attributeChangedCallback in setAttribute #607

Open
oscarmarina opened this issue Jan 24, 2025 · 0 comments

Comments

@oscarmarina
Copy link

oscarmarina commented Jan 24, 2025

Description

The patched class setAttribute calls attributeChangedCallback without converting value to a string. This can lead to unexpected behavior when passing numeric or otherwise non-string values.

Example

Playground

Steps to reproduce

Expected behavior

Similar to toggleAttribute, a preliminary step const newValue = this.getAttribute(name) is added for use in attributeChangedCallback.

Image

Actual behavior

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant