- From: Ståle Raknes <notifications@github.com>
- Date: Tue, 17 Sep 2019 07:52:32 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 17 September 2019 14:52:54 UTC
Since both `Element.setAttribute` and `Element.getAttribute` is converting the Attribute name to ASCII lowercase by default, the `sequence<DOMString>` returned from `observedAttributes` should also be converted the same way. If we take the flag as an example: ```HTML <flag-icon selectedCountry="no"></flag-icon> ``` And then do this ```javascript class FlagIcon extends HTMLElement { constructor() { super(); //... } static get observedAttributes() { return ["selectedCountry"]; } attributeChangedCallback(name, oldValue, newValue) { //... } //... } customElements.define('flag-icon', FlagIcon); ``` This example will not work since the the name in the tag is converted to ASCII lowercase, and the observedAttribute list is not. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/838
Received on Tuesday, 17 September 2019 14:52:54 UTC