Skip to content

Commit 91d4aeb

Browse files
committed
Pass through fourth namespace param on attributeChangedCallback.
1 parent 92d282a commit 91d4aeb

5 files changed

Lines changed: 13 additions & 8 deletions

File tree

lib/elements/dom-module.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@
7878
* @param {string} name Name of attribute.
7979
* @param {?string} old Old value of attribute.
8080
* @param {?string} value Current value of attribute.
81+
* @param {?string} namespace Attribute namespace.
8182
* @return {void}
8283
*/
83-
attributeChangedCallback(name, old, value) {
84+
attributeChangedCallback(name, old, value, namespace) {
8485
if (old !== value) {
8586
this.register();
8687
}

lib/legacy/legacy-element-mixin.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,13 @@
137137
* @param {string} name Name of attribute.
138138
* @param {?string} old Old value of attribute.
139139
* @param {?string} value Current value of attribute.
140+
* @param {?string} namespace Attribute namespace.
140141
* @return {void}
141142
* @override
142143
*/
143-
attributeChangedCallback(name, old, value) {
144+
attributeChangedCallback(name, old, value, namespace) {
144145
if (old !== value) {
145-
super.attributeChangedCallback(name, old, value);
146+
super.attributeChangedCallback(name, old, value, namespace);
146147
this.attributeChanged(name, old, value);
147148
}
148149
}

lib/mixins/disable-upgrade-mixin.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
}
6161

6262
/** @override */
63-
attributeChangedCallback(name, old, value) {
63+
attributeChangedCallback(name, old, value, namespace) {
6464
if (name == DISABLED_ATTR) {
6565
if (!this.__dataEnabled && value == null && this.isConnected) {
6666
super.connectedCallback();
6767
}
6868
} else {
69-
super.attributeChangedCallback(name, old, value);
69+
super.attributeChangedCallback(name, old, value, namespace);
7070
}
7171
}
7272

@@ -113,4 +113,4 @@
113113

114114
})();
115115

116-
</script>
116+
</script>

lib/mixins/properties-changed.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,16 @@
407407
* @param {string} name Name of attribute that changed
408408
* @param {?string} old Old attribute value
409409
* @param {?string} value New attribute value
410+
* @param {?string} namespace Attribute namespace.
410411
* @return {void}
411412
* @suppress {missingProperties} Super may or may not implement the callback
412413
*/
413-
attributeChangedCallback(name, old, value) {
414+
attributeChangedCallback(name, old, value, namespace) {
414415
if (old !== value) {
415416
this._attributeToProperty(name, value);
416417
}
417418
if (super.attributeChangedCallback) {
418-
super.attributeChangedCallback(name, old, value);
419+
super.attributeChangedCallback(name, old, value, namespace);
419420
}
420421
}
421422

test/smoke/behavior-mixin.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</template>
2323
</dom-module>
2424
<script>
25+
/** @polymerBehavior */
2526
var MyBehavior = {
2627
properties: {
2728
behaviorProp: {
@@ -37,6 +38,7 @@
3738
}
3839
}
3940

41+
/** @polymerBehavior */
4042
var MyBehavior2 = {
4143
ready: function() {
4244
console.log(this.localName, 'MyBehavior2.ready');

0 commit comments

Comments
 (0)