| Index: third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js
|
| index 0c82fadb668e4e741760d019ffd9bddaa4d71c1f..a76eaa50cdf1800c865e08e7b0fabe4269e1c51a 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js
|
| @@ -1,4 +1,9 @@
|
| /**
|
| + * Singleton IronMeta instance.
|
| + */
|
| + Polymer.IronValidatableBehaviorMeta = null;
|
| +
|
| + /**
|
| * `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
|
| * Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
|
| *
|
| @@ -27,14 +32,6 @@
|
| properties: {
|
|
|
| /**
|
| - * Namespace for this validator.
|
| - */
|
| - validatorType: {
|
| - type: String,
|
| - value: 'validator'
|
| - },
|
| -
|
| - /**
|
| * Name of the validator to use.
|
| */
|
| validator: {
|
| @@ -51,22 +48,36 @@
|
| value: false
|
| },
|
|
|
| + /**
|
| + * This property is deprecated and should not be used. Use the global
|
| + * validator meta singleton, `Polymer.IronValidatableBehaviorMeta` instead.
|
| + */
|
| _validatorMeta: {
|
| type: Object
|
| - }
|
| + },
|
|
|
| + /**
|
| + * Namespace for this validator. This property is deprecated and should
|
| + * not be used. For all intents and purposes, please consider it a
|
| + * read-only, config-time property.
|
| + */
|
| + validatorType: {
|
| + type: String,
|
| + value: 'validator'
|
| + },
|
| +
|
| + _validator: {
|
| + type: Object,
|
| + computed: '__computeValidator(validator)'
|
| + }
|
| },
|
|
|
| observers: [
|
| '_invalidChanged(invalid)'
|
| ],
|
|
|
| - get _validator() {
|
| - return this._validatorMeta && this._validatorMeta.byKey(this.validator);
|
| - },
|
| -
|
| - ready: function() {
|
| - this._validatorMeta = new Polymer.IronMeta({type: this.validatorType});
|
| + registered: function() {
|
| + Polymer.IronValidatableBehaviorMeta = new Polymer.IronMeta({type: 'validator'});
|
| },
|
|
|
| _invalidChanged: function() {
|
| @@ -113,5 +124,10 @@
|
| return this._validator.validate(value);
|
| }
|
| return true;
|
| + },
|
| +
|
| + __computeValidator: function() {
|
| + return Polymer.IronValidatableBehaviorMeta &&
|
| + Polymer.IronValidatableBehaviorMeta.byKey(this.validator);
|
| }
|
| };
|
|
|