From 107ebde1b17e08fc56a545f51c6f081151e52d24 Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Tue, 20 May 2014 19:14:50 -0700 Subject: [PATCH] Fixes #110 --- src/CustomElements.js | 1 + test/html/attributes.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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;