mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-17 16:34:49 -05:00
Pass through fourth namespace param on attributeChangedCallback.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user