diff --git a/src/CustomElements.js b/src/CustomElements.js index 8d2cd4a..3f22b0d 100644 --- a/src/CustomElements.js +++ b/src/CustomElements.js @@ -321,6 +321,7 @@ if (useNative) { // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/ // index.html#dfn-attribute-changed-callback function changeAttribute(name, value, operation) { + name = name.toLowerCase(); var oldValue = this.getAttribute(name); operation.apply(this, arguments); var newValue = this.getAttribute(name); diff --git a/test/html/attributes.html b/test/html/attributes.html index ed79e56..e58eb82 100644 --- a/test/html/attributes.html +++ b/test/html/attributes.html @@ -31,7 +31,7 @@ chai.assert.isFalse(xfoo.removeAttributeOk); chai.assert.isFalse(xfoo.setAttributeOk); chai.assert.isFalse(xfoo.attributeChangedOk); - xfoo.setAttribute('squid', 'tentacles'); + xfoo.setAttribute('Squid', 'tentacles'); chai.assert.isTrue(xfoo.setAttributeOk); chai.assert.isTrue(xfoo.attributeChangedOk); xfoo.attributeChangedOk = false;