Pass through fourth namespace param on attributeChangedCallback.

This commit is contained in:
Peter Burns
2018-03-30 15:33:39 -07:00
parent 92d282a94b
commit 91d4aebaa6
5 changed files with 13 additions and 8 deletions
+2 -1
View File
@@ -78,9 +78,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @param {string} name Name of attribute.
* @param {?string} old Old value of attribute.
* @param {?string} value Current value of attribute.
* @param {?string} namespace Attribute namespace.
* @return {void}
*/
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (old !== value) {
this.register();
}
+3 -2
View File
@@ -137,12 +137,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @param {string} name Name of attribute.
* @param {?string} old Old value of attribute.
* @param {?string} value Current value of attribute.
* @param {?string} namespace Attribute namespace.
* @return {void}
* @override
*/
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (old !== value) {
super.attributeChangedCallback(name, old, value);
super.attributeChangedCallback(name, old, value, namespace);
this.attributeChanged(name, old, value);
}
}
+3 -3
View File
@@ -60,13 +60,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
/** @override */
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (name == DISABLED_ATTR) {
if (!this.__dataEnabled && value == null && this.isConnected) {
super.connectedCallback();
}
} else {
super.attributeChangedCallback(name, old, value);
super.attributeChangedCallback(name, old, value, namespace);
}
}
@@ -113,4 +113,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
})();
</script>
</script>
+3 -2
View File
@@ -407,15 +407,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @param {string} name Name of attribute that changed
* @param {?string} old Old attribute value
* @param {?string} value New attribute value
* @param {?string} namespace Attribute namespace.
* @return {void}
* @suppress {missingProperties} Super may or may not implement the callback
*/
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (old !== value) {
this._attributeToProperty(name, value);
}
if (super.attributeChangedCallback) {
super.attributeChangedCallback(name, old, value);
super.attributeChangedCallback(name, old, value, namespace);
}
}
+2
View File
@@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</dom-module>
<script>
/** @polymerBehavior */
var MyBehavior = {
properties: {
behaviorProp: {
@@ -37,6 +38,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
}
/** @polymerBehavior */
var MyBehavior2 = {
ready: function() {
console.log(this.localName, 'MyBehavior2.ready');