polyfills
polyfills copied to clipboard
[scoped-custom-element-registry] Non-string Values Are Not Properly Stringified Before Calling attributeChangedCallback in setAttribute
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
Steps to reproduce
Expected behavior
Similar to
toggleAttribute, a preliminary stepconst newValue = this.getAttribute(name)is added for use inattributeChangedCallback.