Permalink
Browse files

only fire attributeChanged if the attribute value was changed

  • Loading branch information...
sjmiles committed May 8, 2013
1 parent 0aabe6b commit 9f7cf5268b01c9c9568b6d239995f6b01a027012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/CustomElements.js
View
@@ -255,7 +255,8 @@ function removeAttribute(name, value) {
function changeAttribute(name, value, operation) {
var oldValue = this.getAttribute(name);
operation.apply(this, arguments);
- if (this.attributeChangedCallback) {
+ if (this.attributeChangedCallback
+ && (this.getAttribute(name) !== oldValue)) {
this.attributeChangedCallback(name, oldValue);
}
}

0 comments on commit 9f7cf52

Please sign in to comment.