@polymer/polymer
Advanced tools
Comparing version 2.3.1 to 2.4.0
<!-- | ||
If you are asking a question rather than filing a bug, try one of these instead: | ||
- StackOverflow (http://stackoverflow.com/questions/tagged/polymer) | ||
- StackOverflow (https://stackoverflow.com/questions/tagged/polymer) | ||
- Polymer Slack Channel (https://bit.ly/polymerslack) | ||
@@ -12,4 +12,7 @@ - Mailing List (https://groups.google.com/forum/#!forum/polymer-dev) | ||
#### Live Demo | ||
<!-- Fork this JSBin, or provide your own URL --> | ||
http://jsbin.com/luhaxab/1/edit | ||
<!-- jsBin starting point (fork and edit) --> | ||
https://jsbin.com/luhaxab/1/edit | ||
<!-- glitch.me starting point (remix and edit -- must be logged in to persist!) --> | ||
https://glitch.com/edit/#!/polymer-repro?path=my-element.html:2:0 | ||
<!-- ...or provide your own repro URL --> | ||
@@ -16,0 +19,0 @@ #### Steps to Reproduce |
@@ -45,3 +45,3 @@ # Contributing to Polymer | ||
Please file issues using the issue template provided, filling out as many fields as possible. We love examples for addressing issues - issues with a Plunkr, jsFiddle, or jsBin will be much easier for us to work on quickly. You can start with [this jsbin](http://jsbin.com/luhaxab/edit) which sets up the basics to demonstrate a Polymer element. | ||
Please file issues using the issue template provided, filling out as many fields as possible. We love examples for addressing issues - issues with a jsBin, Plunkr, jsFiddle, or glitch.me repro will be much easier for us to work on quickly. You can start with [this jsbin](http://jsbin.com/luhaxab/edit) which sets up the basics to demonstrate a Polymer element. If you need your repro to run in IE11, you can start from [this glitch](https://glitch.com/edit/#!/polymer-repro?path=my-element.html:2:0), which serves the source via polyserve for automatic transpilation, although you must sign up for a glitch.me account to ensure your code persists for more than 5 days (note the glitch.me _editing environment_ is not compatible with IE11, however the "live" view link of the running code should work). | ||
@@ -94,11 +94,11 @@ Occasionally we'll close issues if they appear stale or are too vague - please don't take this personally! Please feel free to re-open issues we've closed if there's something we've missed and they still need to be addressed. | ||
npm install && bower install | ||
npm install && bower install | ||
3. Run the tests: | ||
npm test | ||
npm test | ||
Or if you have `web-component-tester` installed locally: | ||
wct | ||
wct | ||
@@ -115,7 +115,7 @@ To run individual test suites: | ||
npm test test/unit/template.html | ||
npm test test/unit/template.html | ||
You can also run tests in the browser: | ||
polyserve | ||
polyserve | ||
@@ -128,22 +128,21 @@ Navigate to: | ||
To run the element unit tests, you need a global | ||
install of `web-component-tester` or `polyserve` (or both). | ||
To run the element unit tests, you need a global install of `web-component-tester` or `polyserve` (or both). | ||
1. Clone the element repo. | ||
1. Clone the element repo. | ||
2. Install the dependencies. | ||
1. Install the dependencies. | ||
bower install | ||
bower install | ||
3. Run the tests: | ||
1. Run the tests: | ||
wct | ||
wct | ||
Or run the tests in a browser: | ||
Or run the tests in a browser: | ||
polyserve | ||
polyserve | ||
Navigate to: | ||
Navigate to: | ||
<code>http://localhost:8080/components/<var>element-name</var>/test/runner.html</code> | ||
<code>http://localhost:8080/components/<var>element-name</var>/test/runner.html</code> | ||
@@ -155,5 +154,3 @@ ### Configuring `web-component-tester` | ||
See the [`web-component-tester` README](https://github.com/Polymer/web-component-tester) for | ||
information on configuring the tool. | ||
See the [`web-component-tester` README](https://github.com/Polymer/web-component-tester) for | ||
information on configuring the tool. |
@@ -17,73 +17,98 @@ /** | ||
*/ | ||
function Polymer_PropertyAccessors(){} | ||
/** @type {boolean} */ | ||
Polymer_PropertyAccessors.prototype.__serializing; | ||
/** @type {number} */ | ||
Polymer_PropertyAccessors.prototype.__dataCounter; | ||
/** @type {boolean} */ | ||
Polymer_PropertyAccessors.prototype.__dataEnabled; | ||
/** @type {boolean} */ | ||
Polymer_PropertyAccessors.prototype.__dataReady; | ||
/** @type {boolean} */ | ||
Polymer_PropertyAccessors.prototype.__dataInvalid; | ||
/** @type {!Object} */ | ||
Polymer_PropertyAccessors.prototype.__data; | ||
/** @type {Object} */ | ||
Polymer_PropertyAccessors.prototype.__dataPending; | ||
/** @type {Object} */ | ||
Polymer_PropertyAccessors.prototype.__dataOld; | ||
/** @type {Object} */ | ||
Polymer_PropertyAccessors.prototype.__dataProto; | ||
/** @type {Object} */ | ||
Polymer_PropertyAccessors.prototype.__dataHasAccessor; | ||
/** @type {Object} */ | ||
Polymer_PropertyAccessors.prototype.__dataInstanceProps; | ||
function Polymer_PropertiesChanged(){} | ||
/** | ||
* @param {string} name Name of attribute that changed | ||
* @param {?string} old Old attribute value | ||
* @param {?string} value New attribute value | ||
* @param {string} property Name of the property | ||
* @param {boolean=} readOnly When true, no setter is created; the | ||
protected `_setProperty` function must be used to set the property | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype.attributeChangedCallback = function(name, old, value){}; | ||
Polymer_PropertiesChanged.prototype._createPropertyAccessor = function(property, readOnly){}; | ||
/** | ||
* @return {undefined} | ||
* @param {string} property Name of the property | ||
* @param {boolean=} readOnly When true, no setter is created | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._initializeProperties = function(){}; | ||
Polymer_PropertiesChanged.prototype._definePropertyAccessor = function(property, readOnly){}; | ||
/** | ||
* @param {Object} props Bag of property values that were overwritten | ||
when creating property accessors. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._initializeProtoProperties = function(props){}; | ||
Polymer_PropertiesChanged.prototype.ready = function(){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._initializeProperties = function(){}; | ||
/** | ||
* @param {Object} props Bag of property values that were overwritten | ||
when creating property accessors. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._initializeInstanceProperties = function(props){}; | ||
Polymer_PropertiesChanged.prototype._initializeInstanceProperties = function(props){}; | ||
/** | ||
* @param {string} attribute Name of attribute to ensure is set. | ||
* @param {string} value of the attribute. | ||
* @param {string} property Name of the property | ||
* @param {*} value Value to set | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._ensureAttribute = function(attribute, value){}; | ||
Polymer_PropertiesChanged.prototype._setProperty = function(property, value){}; | ||
/** | ||
* @param {string} property Name of property | ||
* @return {*} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._getProperty = function(property){}; | ||
/** | ||
* @param {string} property Name of the property | ||
* @param {*} value Value to set | ||
* @param {boolean=} ext Not used here; affordance for closure | ||
* @return {boolean} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._setPendingProperty = function(property, value, ext){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._invalidateProperties = function(){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._enableProperties = function(){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._flushProperties = function(){}; | ||
/** | ||
* @param {!Object} currentProps Bag of all current accessor values | ||
* @param {!Object} changedProps Bag of properties changed since the last | ||
call to `_propertiesChanged` | ||
* @param {!Object} oldProps Bag of previous values for each property | ||
in `changedProps` | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._propertiesChanged = function(currentProps, changedProps, oldProps){}; | ||
/** | ||
* @param {string} property Property name | ||
* @param {*} value New property value | ||
* @param {*} old Previous property value | ||
* @return {boolean} | ||
*/ | ||
Polymer_PropertiesChanged.prototype._shouldPropertyChange = function(property, value, old){}; | ||
/** | ||
* @param {string} name Name of attribute that changed | ||
* @param {?string} old Old attribute value | ||
* @param {?string} value New attribute value | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesChanged.prototype.attributeChangedCallback = function(name, old, value){}; | ||
/** | ||
* @param {string} attribute Name of attribute to deserialize. | ||
* @param {?string} value of the attribute. | ||
* @param {*=} type type to deserialize to. | ||
* @param {*=} type type to deserialize to, defaults to the value | ||
returned from `typeForProperty` | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._attributeToProperty = function(attribute, value, type){}; | ||
Polymer_PropertiesChanged.prototype._attributeToProperty = function(attribute, value, type){}; | ||
/** | ||
* @param {string} property Property name to reflect. | ||
* @param {string=} attribute Attribute name to reflect. | ||
* @param {string=} attribute Attribute name to reflect to. | ||
* @param {*=} value Property value to refect. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._propertyToAttribute = function(property, attribute, value){}; | ||
Polymer_PropertiesChanged.prototype._propertyToAttribute = function(property, attribute, value){}; | ||
/** | ||
@@ -93,76 +118,93 @@ * @param {Element} node Element to set attribute to. | ||
* @param {string} attribute Attribute name to serialize to. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._valueToNodeAttribute = function(node, value, attribute){}; | ||
Polymer_PropertiesChanged.prototype._valueToNodeAttribute = function(node, value, attribute){}; | ||
/** | ||
* @param {*} value Property value to serialize. | ||
* @return {(string|undefined)} | ||
* @return {(string | undefined)} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._serializeValue = function(value){}; | ||
Polymer_PropertiesChanged.prototype._serializeValue = function(value){}; | ||
/** | ||
* @param {?string} value Attribute value to deserialize. | ||
* @param {?string} value Value to deserialize. | ||
* @param {*=} type Type to deserialize the string to. | ||
* @return {*} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._deserializeValue = function(value, type){}; | ||
Polymer_PropertiesChanged.prototype._deserializeValue = function(value, type){}; | ||
/** | ||
* @param {string} property Name of the property | ||
* @param {boolean=} readOnly When true, no setter is created; the | ||
protected `_setProperty` function must be used to set the property | ||
* @param {!Object} props Object whose keys are names of accessors. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._createPropertyAccessor = function(property, readOnly){}; | ||
Polymer_PropertiesChanged.createProperties = function(props){}; | ||
/** | ||
* @param {string} property Property name | ||
* @return {boolean} | ||
* @param {string} property Property to convert | ||
* @return {string} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._hasAccessor = function(property){}; | ||
Polymer_PropertiesChanged.attributeNameForProperty = function(property){}; | ||
/** | ||
* @param {string} property Name of the property | ||
* @param {*} value Value to set | ||
* @param {string} name Name of property | ||
*/ | ||
Polymer_PropertyAccessors.prototype._setProperty = function(property, value){}; | ||
Polymer_PropertiesChanged.typeForProperty = function(name){}; | ||
/** | ||
* @param {string} property Name of the property | ||
* @param {*} value Value to set | ||
* @return {boolean} | ||
* @interface | ||
* @extends {Polymer_PropertiesChanged} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._setPendingProperty = function(property, value){}; | ||
function Polymer_PropertyAccessors(){} | ||
/** | ||
* @param {string} prop Property name | ||
* @return {boolean} | ||
* @param {string} property Name of the property | ||
* @param {boolean=} readOnly When true, no setter is created | ||
When calling on a prototype, any overwritten values are saved in | ||
`__dataProto`, and it is up to the subclasser to decide how/when | ||
to set those properties back into the accessor. When calling on an | ||
instance, the overwritten value is set via `_setPendingProperty`, | ||
and the user should call `_invalidateProperties` or `_flushProperties` | ||
for the values to take effect. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._isPropertyPending = function(prop){}; | ||
Polymer_PropertyAccessors.prototype._definePropertyAccessor = function(property, readOnly){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._invalidateProperties = function(){}; | ||
Polymer_PropertyAccessors.prototype._initializeProperties = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @param {*} value Property value to serialize. | ||
* @return {(string | undefined)} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._enableProperties = function(){}; | ||
Polymer_PropertyAccessors.prototype._serializeValue = function(value){}; | ||
/** | ||
* @return {undefined} | ||
* @param {?string} value Attribute value to deserialize. | ||
* @param {*=} type Type to deserialize the string to. | ||
* @return {*} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._flushProperties = function(){}; | ||
Polymer_PropertyAccessors.prototype._deserializeValue = function(value, type){}; | ||
/** | ||
* @return {undefined} | ||
* @param {Object} props Bag of property values that were overwritten | ||
when creating property accessors. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype.ready = function(){}; | ||
Polymer_PropertyAccessors.prototype._initializeProtoProperties = function(props){}; | ||
/** | ||
* @param {!Object} currentProps Bag of all current accessor values | ||
* @param {!Object} changedProps Bag of properties changed since the last | ||
call to `_propertiesChanged` | ||
* @param {!Object} oldProps Bag of previous values for each property | ||
in `changedProps` | ||
* @param {string} attribute Name of attribute to ensure is set. | ||
* @param {string} value of the attribute. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._propertiesChanged = function(currentProps, changedProps, oldProps){}; | ||
Polymer_PropertyAccessors.prototype._ensureAttribute = function(attribute, value){}; | ||
/** | ||
* @param {string} property Property name | ||
* @param {*} value New property value | ||
* @param {*} old Previous property value | ||
* @return {boolean} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._shouldPropertyChange = function(property, value, old){}; | ||
Polymer_PropertyAccessors.prototype._hasAccessor = function(property){}; | ||
/** | ||
* @return {undefined} | ||
* @param {string} prop Property name | ||
* @return {boolean} | ||
*/ | ||
Polymer_PropertyAccessors.prototype._isPropertyPending = function(prop){}; | ||
/** | ||
* @param {string} property Property to convert | ||
* @return {string} | ||
*/ | ||
Polymer_PropertyAccessors.attributeNameForProperty = function(property){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyAccessors.createPropertiesForAttributes = function(){}; | ||
@@ -179,3 +221,3 @@ /** | ||
/** | ||
* @param {Node} node Node to add listener on | ||
* @param {!Node} node Node to add listener on | ||
* @param {string} eventName Name of event | ||
@@ -189,5 +231,6 @@ * @param {string} methodName Name of method | ||
/** | ||
* @param {Node} node Node to add event listener to | ||
* @param {!Node} node Node to add event listener to | ||
* @param {string} eventName Name of event | ||
* @param {Function} handler Listener function to add | ||
* @param {function (!Event): void} handler Listener function to add | ||
* @return {void} | ||
*/ | ||
@@ -198,3 +241,4 @@ Polymer_TemplateStamp.prototype._addEventListenerToNode = function(node, eventName, handler){}; | ||
* @param {string} eventName Name of event | ||
* @param {Function} handler Listener function to remove | ||
* @param {function (!Event): void} handler Listener function to remove | ||
* @return {void} | ||
*/ | ||
@@ -226,2 +270,3 @@ Polymer_TemplateStamp.prototype._removeEventListenerFromNode = function(node, eventName, handler){}; | ||
* @param {!NodeInfo} nodeInfo Node metadata for current template. | ||
* @return {void} | ||
*/ | ||
@@ -264,14 +309,2 @@ Polymer_TemplateStamp._parseTemplateChildNodes = function(root, templateInfo, nodeInfo){}; | ||
function Polymer_PropertyEffects(){} | ||
/** @type {number} */ | ||
Polymer_PropertyEffects.prototype.__dataCounter; | ||
/** @type {!Object} */ | ||
Polymer_PropertyEffects.prototype.__data; | ||
/** @type {!Object} */ | ||
Polymer_PropertyEffects.prototype.__dataPending; | ||
/** @type {!Object} */ | ||
Polymer_PropertyEffects.prototype.__dataOld; | ||
/** @type {boolean} */ | ||
@@ -304,2 +337,11 @@ Polymer_PropertyEffects.prototype.__dataClientsReady; | ||
/** @type {!Object} */ | ||
Polymer_PropertyEffects.prototype.__data; | ||
/** @type {!Object} */ | ||
Polymer_PropertyEffects.prototype.__dataPending; | ||
/** @type {!Object} */ | ||
Polymer_PropertyEffects.prototype.__dataOld; | ||
/** @type {Object} */ | ||
@@ -333,13 +375,14 @@ Polymer_PropertyEffects.prototype.__computeEffects; | ||
/** | ||
* @return {undefined} | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._initializeProperties = function(){}; | ||
Polymer_PropertyEffects.prototype.ready = function(){}; | ||
/** | ||
* @override | ||
* @param {Object} props Properties to initialize on the prototype | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._initializeProtoProperties = function(props){}; | ||
Polymer_PropertyEffects.prototype._initializeProperties = function(){}; | ||
/** | ||
* @override | ||
* @param {Object} props Properties to initialize on the instance | ||
* @return {void} | ||
*/ | ||
@@ -349,2 +392,5 @@ Polymer_PropertyEffects.prototype._initializeInstanceProperties = function(props){}; | ||
* @override | ||
* @param {string} property Name of the property | ||
* @param {*} value Value to set | ||
* @return {void} | ||
*/ | ||
@@ -363,16 +409,29 @@ Polymer_PropertyEffects.prototype._setProperty = function(property, value){}; | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._invalidateProperties = function(){}; | ||
/** | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype.ready = function(){}; | ||
Polymer_PropertyEffects.prototype._flushProperties = function(){}; | ||
/** | ||
* @override | ||
* @param {!Object} currentProps Bag of all current accessor values | ||
* @param {!Object} changedProps Bag of properties changed since the last | ||
call to `_propertiesChanged` | ||
* @param {!Object} oldProps Bag of previous values for each property | ||
in `changedProps` | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._propertiesChanged = function(currentProps, changedProps, oldProps){}; | ||
/** | ||
* @override | ||
* @param {Object} props Properties to initialize on the prototype | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._initializeProtoProperties = function(props){}; | ||
/** | ||
* @param {string} property Property that should trigger the effect | ||
* @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES | ||
* @param {Object=} effect Effect metadata object | ||
* @return {void} | ||
*/ | ||
@@ -384,2 +443,3 @@ Polymer_PropertyEffects.prototype._addPropertyEffect = function(property, type, effect){}; | ||
* @param {Object=} effect Effect metadata object to remove | ||
* @return {void} | ||
*/ | ||
@@ -414,3 +474,3 @@ Polymer_PropertyEffects.prototype._removePropertyEffect = function(property, type, effect){}; | ||
/** | ||
* @param {(string|!Array.<(number|string)>)} path Path to set | ||
* @param {(string | !Array.<(number | string)>)} path Path to set | ||
* @param {*} value Value to set | ||
@@ -428,5 +488,6 @@ * @param {boolean=} shouldNotify Set to true if this change should | ||
/** | ||
* @param {Node} node The node to set a property on | ||
* @param {!Node} node The node to set a property on | ||
* @param {string} prop The property to set | ||
* @param {*} value The value to set | ||
* @return {void} | ||
*/ | ||
@@ -436,10 +497,11 @@ Polymer_PropertyEffects.prototype._setUnmanagedPropertyToNode = function(node, prop, value){}; | ||
* @param {Object} client PropertyEffects client to enqueue | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._enqueueClient = function(client){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._flushClients = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
@@ -453,2 +515,3 @@ Polymer_PropertyEffects.prototype._readyClients = function(){}; | ||
`readOnly: true` root properties. | ||
* @return {void} | ||
*/ | ||
@@ -460,11 +523,14 @@ Polymer_PropertyEffects.prototype.setProperties = function(props, setReadOnly){}; | ||
* @param {boolean} hasPaths True with `props` contains one or more paths | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._propagatePropertyChanges = function(changedProps, oldProps, hasPaths){}; | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} to Target path to link. | ||
* @param {(string|!Array.<(string|number)>)} from Source path to link. | ||
* @param {(string | !Array.<(string | number)>)} to Target path to link. | ||
* @param {(string | !Array.<(string | number)>)} from Source path to link. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype.linkPaths = function(to, from){}; | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Target path to unlink. | ||
* @param {(string | !Array.<(string | number)>)} path Target path to unlink. | ||
* @return {void} | ||
*/ | ||
@@ -486,6 +552,7 @@ Polymer_PropertyEffects.prototype.unlinkPaths = function(path){}; | ||
ordered and must be normalized/merged before notifying). | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype.notifySplices = function(path, splices){}; | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to the value | ||
* @param {(string | !Array.<(string | number)>)} path Path to the value | ||
to read. The path may be specified as a string (e.g. `foo.bar.baz`) | ||
@@ -502,3 +569,3 @@ or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to the value | ||
* @param {(string | !Array.<(string | number)>)} path Path to the value | ||
to write. The path may be specified as a string (e.g. `'foo.bar.baz'`) | ||
@@ -513,7 +580,8 @@ or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that | ||
When specified, no notification will occur. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype.set = function(path, value, root){}; | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to array. | ||
* @param {...*} items | ||
* @param {(string | !Array.<(string | number)>)} path Path to array. | ||
* @param {...*} items Items to push onto array | ||
* @return {number} | ||
@@ -523,3 +591,3 @@ */ | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to array. | ||
* @param {(string | !Array.<(string | number)>)} path Path to array. | ||
* @return {*} | ||
@@ -529,6 +597,6 @@ */ | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to array. | ||
* @param {(string | !Array.<(string | number)>)} path Path to array. | ||
* @param {number} start Index from which to start removing/inserting. | ||
* @param {number} deleteCount Number of items to remove. | ||
* @param {...*} items | ||
* @param {...*} items Items to insert into array. | ||
* @return {Array} | ||
@@ -538,3 +606,3 @@ */ | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to array. | ||
* @param {(string | !Array.<(string | number)>)} path Path to array. | ||
* @return {*} | ||
@@ -544,4 +612,4 @@ */ | ||
/** | ||
* @param {(string|!Array.<(string|number)>)} path Path to array. | ||
* @param {...*} items | ||
* @param {(string | !Array.<(string | number)>)} path Path to array. | ||
* @param {...*} items Items to insert info array | ||
* @return {number} | ||
@@ -553,2 +621,3 @@ */ | ||
* @param {*=} value Value at the path (optional). | ||
* @return {void} | ||
*/ | ||
@@ -560,2 +629,3 @@ Polymer_PropertyEffects.prototype.notifyPath = function(path, value){}; | ||
when `true`. | ||
* @return {void} | ||
*/ | ||
@@ -565,11 +635,13 @@ Polymer_PropertyEffects.prototype._createReadOnlyProperty = function(property, protectedSetter){}; | ||
* @param {string} property Property name | ||
* @param {string} methodName Name of observer method to call | ||
* @param {(string | function (*, *))} method Function or name of observer method to call | ||
* @param {boolean=} dynamicFn Whether the method name should be included as | ||
a dependency to the effect. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._createPropertyObserver = function(property, methodName, dynamicFn){}; | ||
Polymer_PropertyEffects.prototype._createPropertyObserver = function(property, method, dynamicFn){}; | ||
/** | ||
* @param {string} expression Method expression | ||
* @param {(boolean|Object)=} dynamicFn Boolean or object map indicating | ||
* @param {(boolean | Object)=} dynamicFn Boolean or object map indicating | ||
whether method names should be included as a dependency to the effect. | ||
* @return {void} | ||
*/ | ||
@@ -579,2 +651,3 @@ Polymer_PropertyEffects.prototype._createMethodObserver = function(expression, dynamicFn){}; | ||
* @param {string} property Property name | ||
* @return {void} | ||
*/ | ||
@@ -584,2 +657,3 @@ Polymer_PropertyEffects.prototype._createNotifyingProperty = function(property){}; | ||
* @param {string} property Property name | ||
* @return {void} | ||
*/ | ||
@@ -590,8 +664,9 @@ Polymer_PropertyEffects.prototype._createReflectedProperty = function(property){}; | ||
* @param {string} expression Method expression | ||
* @param {(boolean|Object)=} dynamicFn Boolean or object map indicating | ||
* @param {(boolean | Object)=} dynamicFn Boolean or object map indicating | ||
whether method names should be included as a dependency to the effect. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.prototype._createComputedProperty = function(property, expression, dynamicFn){}; | ||
/** | ||
* @param {HTMLTemplateElement} template Template containing binding | ||
* @param {!HTMLTemplateElement} template Template containing binding | ||
bindings | ||
@@ -609,2 +684,3 @@ * @param {boolean=} instanceBinding When false (default), performs | ||
from `_stampTemplate` associated with the nodes to be removed | ||
* @return {void} | ||
*/ | ||
@@ -642,2 +718,3 @@ Polymer_PropertyEffects.prototype._removeBoundDom = function(dom){}; | ||
* @param {Object=} effect Effect metadata object | ||
* @return {void} | ||
*/ | ||
@@ -647,11 +724,12 @@ Polymer_PropertyEffects.addPropertyEffect = function(property, type, effect){}; | ||
* @param {string} property Property name | ||
* @param {string} methodName Name of observer method to call | ||
* @param {(string | function (*, *))} method Function or name of observer method to call | ||
* @param {boolean=} dynamicFn Whether the method name should be included as | ||
a dependency to the effect. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.createPropertyObserver = function(property, methodName, dynamicFn){}; | ||
Polymer_PropertyEffects.createPropertyObserver = function(property, method, dynamicFn){}; | ||
/** | ||
* @param {string} expression Method expression | ||
* @param {(boolean|Object)=} dynamicFn Boolean or object map indicating | ||
whether method names should be included as a dependency to the effect. | ||
* @param {(boolean | Object)=} dynamicFn Boolean or object map indicating | ||
* @return {void} | ||
*/ | ||
@@ -661,2 +739,3 @@ Polymer_PropertyEffects.createMethodObserver = function(expression, dynamicFn){}; | ||
* @param {string} property Property name | ||
* @return {void} | ||
*/ | ||
@@ -668,2 +747,3 @@ Polymer_PropertyEffects.createNotifyingProperty = function(property){}; | ||
when `true`. | ||
* @return {void} | ||
*/ | ||
@@ -673,2 +753,3 @@ Polymer_PropertyEffects.createReadOnlyProperty = function(property, protectedSetter){}; | ||
* @param {string} property Property name | ||
* @return {void} | ||
*/ | ||
@@ -679,10 +760,11 @@ Polymer_PropertyEffects.createReflectedProperty = function(property){}; | ||
* @param {string} expression Method expression | ||
* @param {(boolean|Object)=} dynamicFn Boolean or object map indicating whether | ||
* @param {(boolean | Object)=} dynamicFn Boolean or object map indicating whether | ||
method names should be included as a dependency to the effect. | ||
* @return {void} | ||
*/ | ||
Polymer_PropertyEffects.createComputedProperty = function(property, expression, dynamicFn){}; | ||
/** | ||
* @param {HTMLTemplateElement} template Template containing binding | ||
* @param {!HTMLTemplateElement} template Template containing binding | ||
bindings | ||
* @return {Object} | ||
* @return {!TemplateInfo} | ||
*/ | ||
@@ -694,2 +776,3 @@ Polymer_PropertyEffects.bindTemplate = function(template){}; | ||
* @param {Object=} effect Effect metadata object | ||
* @return {void} | ||
*/ | ||
@@ -716,3 +799,35 @@ Polymer_PropertyEffects._addTemplatePropertyEffect = function(templateInfo, prop, effect){}; | ||
* @interface | ||
* @extends {Polymer_PropertiesChanged} | ||
*/ | ||
function Polymer_PropertiesMixin(){} | ||
/** | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesMixin.prototype._initializeProperties = function(){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesMixin.prototype.connectedCallback = function(){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesMixin.prototype.disconnectedCallback = function(){}; | ||
/** | ||
* @param {string} name Name of property | ||
* @return {*} | ||
*/ | ||
Polymer_PropertiesMixin.typeForProperty = function(name){}; | ||
/** | ||
* @return {void} | ||
*/ | ||
Polymer_PropertiesMixin.finalize = function(){}; | ||
/** | ||
* @return {undefined} | ||
*/ | ||
Polymer_PropertiesMixin._finalizeClass = function(){}; | ||
/** | ||
* @interface | ||
* @extends {Polymer_PropertyEffects} | ||
* @extends {Polymer_PropertiesMixin} | ||
*/ | ||
@@ -732,3 +847,3 @@ function Polymer_ElementMixin(){} | ||
/** @type {(StampedTemplate|HTMLElement|ShadowRoot)} */ | ||
/** @type {(StampedTemplate | HTMLElement | ShadowRoot)} */ | ||
Polymer_ElementMixin.prototype.root; | ||
@@ -741,9 +856,8 @@ | ||
* @override | ||
* @param {string} name Name of attribute. | ||
* @param {?string} old Old value of attribute. | ||
* @param {?string} value Current value of attribute. | ||
* @return {void} | ||
*/ | ||
Polymer_ElementMixin.prototype.attributeChangedCallback = function(name, old, value){}; | ||
Polymer_ElementMixin.prototype.ready = function(){}; | ||
/** | ||
* @override | ||
* @return {void} | ||
*/ | ||
@@ -753,17 +867,10 @@ Polymer_ElementMixin.prototype._initializeProperties = function(){}; | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_ElementMixin.prototype.ready = function(){}; | ||
/** | ||
* @override | ||
*/ | ||
Polymer_ElementMixin.prototype._readyClients = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_ElementMixin.prototype.connectedCallback = function(){}; | ||
/** | ||
* @return {undefined} | ||
*/ | ||
Polymer_ElementMixin.prototype.disconnectedCallback = function(){}; | ||
/** | ||
* @param {StampedTemplate} dom to attach to the element. | ||
@@ -776,2 +883,3 @@ * @return {ShadowRoot} | ||
apply to this element. | ||
* @return {void} | ||
*/ | ||
@@ -791,6 +899,21 @@ Polymer_ElementMixin.prototype.updateStyles = function(properties){}; | ||
/** | ||
* @return {undefined} | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_ElementMixin.finalize = function(){}; | ||
Polymer_ElementMixin.createProperties = function(props){}; | ||
/** | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_ElementMixin._finalizeClass = function(){}; | ||
/** | ||
* @param {Object} observers Array of observer descriptors for | ||
this class | ||
* @param {Object} dynamicFns Object containing keys for any properties | ||
that are functions and should trigger the effect when the function | ||
reference is changed | ||
* @return {void} | ||
*/ | ||
Polymer_ElementMixin.createObservers = function(observers, dynamicFns){}; | ||
/** | ||
* @param {string} cssText Text containing styling to process | ||
@@ -803,2 +926,3 @@ * @param {string} baseURI Base URI to rebase CSS paths against | ||
* @param {string} is Tag name (or type extension name) for this element | ||
* @return {void} | ||
*/ | ||
@@ -811,11 +935,13 @@ Polymer_ElementMixin._finalizeTemplate = function(is){}; | ||
/** | ||
* @param {*} node | ||
* @param {*} eventName | ||
* @param {*} handler | ||
* @param {!Node} node Node to add event listener to | ||
* @param {string} eventName Name of event | ||
* @param {function (!Event): void} handler Listener function to add | ||
* @return {void} | ||
*/ | ||
Polymer_GestureEventListeners.prototype._addEventListenerToNode = function(node, eventName, handler){}; | ||
/** | ||
* @param {*} node | ||
* @param {*} eventName | ||
* @param {*} handler | ||
* @param {!Node} node Node to remove event listener from | ||
* @param {string} eventName Name of event | ||
* @param {function (!Event): void} handler Listener function to remove | ||
* @return {void} | ||
*/ | ||
@@ -832,11 +958,11 @@ Polymer_GestureEventListeners.prototype._removeEventListenerFromNode = function(node, eventName, handler){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_DirMixin.prototype.ready = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_DirMixin.prototype.connectedCallback = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
@@ -870,9 +996,8 @@ Polymer_DirMixin.prototype.disconnectedCallback = function(){}; | ||
* @override | ||
* @param {string} name Name of attribute. | ||
* @param {?string} old Old value of attribute. | ||
* @param {?string} value Current value of attribute. | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, old, value){}; | ||
Polymer_LegacyElementMixin.prototype.ready = function(){}; | ||
/** | ||
* @override | ||
* @return {void} | ||
*/ | ||
@@ -882,6 +1007,11 @@ Polymer_LegacyElementMixin.prototype._initializeProperties = function(){}; | ||
* @override | ||
* @param {string} name Name of attribute. | ||
* @param {?string} old Old value of attribute. | ||
* @param {?string} value Current value of attribute. | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.ready = function(){}; | ||
Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, old, value){}; | ||
/** | ||
* @override | ||
* @return {void} | ||
*/ | ||
@@ -891,14 +1021,15 @@ Polymer_LegacyElementMixin.prototype.connectedCallback = function(){}; | ||
* @override | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.disconnectedCallback = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.created = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.attached = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
@@ -910,14 +1041,15 @@ Polymer_LegacyElementMixin.prototype.detached = function(){}; | ||
* @param {?string} value Current value of attribute. | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.attributeChanged = function(name, old, value){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype._registered = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype._ensureAttributes = function(){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
@@ -927,3 +1059,3 @@ Polymer_LegacyElementMixin.prototype._applyListeners = function(){}; | ||
* @param {*} value Value to deserialize | ||
* @return {(string|undefined)} | ||
* @return {(string | undefined)} | ||
*/ | ||
@@ -941,2 +1073,3 @@ Polymer_LegacyElementMixin.prototype.serialize = function(value){}; | ||
* @param {*=} value Property value to reflect. | ||
* @return {void} | ||
*/ | ||
@@ -948,2 +1081,3 @@ Polymer_LegacyElementMixin.prototype.reflectPropertyToAttribute = function(property, attribute, value){}; | ||
* @param {Element} node Element to set attribute to. | ||
* @return {void} | ||
*/ | ||
@@ -958,5 +1092,5 @@ Polymer_LegacyElementMixin.prototype.serializeValueToAttribute = function(value, attribute, node){}; | ||
/** | ||
* @param {Object} target Target object to copy properties to. | ||
* @param {Object} source Source object to copy properties from. | ||
* @return {Object} | ||
* @param {!Object} target Target object to copy properties to. | ||
* @param {!Object} source Source object to copy properties from. | ||
* @return {!Object} | ||
*/ | ||
@@ -973,3 +1107,3 @@ Polymer_LegacyElementMixin.prototype.mixin = function(target, source){}; | ||
* @param {HTMLTemplateElement} template HTML template element to instance. | ||
* @return {DocumentFragment} | ||
* @return {!DocumentFragment} | ||
*/ | ||
@@ -981,7 +1115,7 @@ Polymer_LegacyElementMixin.prototype.instanceTemplate = function(template){}; | ||
payload. | ||
* @param {{bubbles: (boolean|undefined), cancelable: (boolean|undefined), composed: (boolean|undefined)}=} options Object specifying options. These may include: | ||
* @param {{bubbles: (boolean | undefined), cancelable: (boolean | undefined), composed: (boolean | undefined)}=} options Object specifying options. These may include: | ||
`bubbles` (boolean, defaults to `true`), | ||
`cancelable` (boolean, defaults to false), and | ||
`node` on which to fire the event (HTMLElement, defaults to `this`). | ||
* @return {Event} | ||
* @return {!Event} | ||
*/ | ||
@@ -993,2 +1127,3 @@ Polymer_LegacyElementMixin.prototype.fire = function(type, detail, options){}; | ||
* @param {string} methodName Name of handler method on `this` to call. | ||
* @return {void} | ||
*/ | ||
@@ -1001,2 +1136,3 @@ Polymer_LegacyElementMixin.prototype.listen = function(node, eventName, methodName){}; | ||
anymore. | ||
* @return {void} | ||
*/ | ||
@@ -1009,2 +1145,3 @@ Polymer_LegacyElementMixin.prototype.unlisten = function(node, eventName, methodName){}; | ||
Defaults to `this`. | ||
* @return {void} | ||
*/ | ||
@@ -1018,7 +1155,7 @@ Polymer_LegacyElementMixin.prototype.setScrollDirection = function(direction, node){}; | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.distributeContent = function(){}; | ||
/** | ||
* @return {Array.<Node>} | ||
* @return {!Array.<!Node>} | ||
*/ | ||
@@ -1028,7 +1165,7 @@ Polymer_LegacyElementMixin.prototype.getEffectiveChildNodes = function(){}; | ||
* @param {string} selector Selector to run. | ||
* @return {Array.<Node>} | ||
* @return {!Array.<!Node>} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.queryDistributedElements = function(selector){}; | ||
/** | ||
* @return {Array.<Node>} | ||
* @return {!Array.<!Node>} | ||
*/ | ||
@@ -1042,3 +1179,3 @@ Polymer_LegacyElementMixin.prototype.getEffectiveChildren = function(){}; | ||
* @param {string} selector Selector to run. | ||
* @return {Object.<Node>} | ||
* @return {Node} | ||
*/ | ||
@@ -1048,3 +1185,3 @@ Polymer_LegacyElementMixin.prototype.queryEffectiveChildren = function(selector){}; | ||
* @param {string} selector Selector to run. | ||
* @return {Array.<Node>} | ||
* @return {!Array.<!Node>} | ||
*/ | ||
@@ -1055,3 +1192,3 @@ Polymer_LegacyElementMixin.prototype.queryAllEffectiveChildren = function(selector){}; | ||
`<slot>`. Defaults to `content`. | ||
* @return {Array.<Node>} | ||
* @return {!Array.<!Node>} | ||
*/ | ||
@@ -1062,3 +1199,3 @@ Polymer_LegacyElementMixin.prototype.getContentChildNodes = function(slctr){}; | ||
`<content>`. Defaults to `content`. | ||
* @return {Array.<HTMLElement>} | ||
* @return {!Array.<!HTMLElement>} | ||
*/ | ||
@@ -1072,3 +1209,3 @@ Polymer_LegacyElementMixin.prototype.getContentChildren = function(slctr){}; | ||
/** | ||
* @param {Element=} node The element to be checked. | ||
* @param {!Element} node The element to be checked. | ||
* @return {boolean} | ||
@@ -1078,4 +1215,5 @@ */ | ||
/** | ||
* @param {*} container | ||
* @param {*} shouldObserve | ||
* @param {*} container Unused | ||
* @param {*} shouldObserve Unused | ||
* @return {void} | ||
*/ | ||
@@ -1090,7 +1228,7 @@ Polymer_LegacyElementMixin.prototype.scopeSubtree = function(container, shouldObserve){}; | ||
* @param {string} jobName String to identify the debounce job. | ||
* @param {function ()} callback Function that is called (with `this` | ||
* @param {function (): void} callback Function that is called (with `this` | ||
context) when the wait time elapses. | ||
* @param {number} wait Optional wait time in milliseconds (ms) after the | ||
last signal that must elapse before invoking `callback` | ||
* @return {Object} | ||
* @return {!Object} | ||
*/ | ||
@@ -1105,2 +1243,3 @@ Polymer_LegacyElementMixin.prototype.debounce = function(jobName, callback, wait){}; | ||
* @param {string} jobName The name of the debouncer started with `debounce` | ||
* @return {void} | ||
*/ | ||
@@ -1110,6 +1249,7 @@ Polymer_LegacyElementMixin.prototype.flushDebouncer = function(jobName){}; | ||
* @param {string} jobName The name of the debouncer started with `debounce` | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.cancelDebouncer = function(jobName){}; | ||
/** | ||
* @param {Function} callback The callback function to run, bound to `this`. | ||
* @param {!Function} callback The callback function to run, bound to `this`. | ||
* @param {number=} waitTime Time to wait before calling the | ||
@@ -1124,2 +1264,3 @@ `callback`. If unspecified or 0, the callback will be run at microtask | ||
cancel. | ||
* @return {void} | ||
*/ | ||
@@ -1129,5 +1270,5 @@ Polymer_LegacyElementMixin.prototype.cancelAsync = function(handle){}; | ||
* @param {string} tag HTML element tag to create. | ||
* @param {Object} props Object of properties to configure on the | ||
* @param {Object=} props Object of properties to configure on the | ||
instance. | ||
* @return {Element} | ||
* @return {!Element} | ||
*/ | ||
@@ -1137,9 +1278,9 @@ Polymer_LegacyElementMixin.prototype.create = function(tag, props){}; | ||
* @param {string} href URL to document to load. | ||
* @param {Function} onload Callback to notify when an import successfully | ||
* @param {?function (!Event): void=} onload Callback to notify when an import successfully | ||
loaded. | ||
* @param {Function} onerror Callback to notify when an import | ||
* @param {?function (!ErrorEvent): void=} onerror Callback to notify when an import | ||
unsuccessfully loaded. | ||
* @param {boolean} optAsync True if the import should be loaded `async`. | ||
* @param {boolean=} optAsync True if the import should be loaded `async`. | ||
Defaults to `false`. | ||
* @return {HTMLLinkElement} | ||
* @return {!HTMLLinkElement} | ||
*/ | ||
@@ -1149,3 +1290,3 @@ Polymer_LegacyElementMixin.prototype.importHref = function(href, onload, onerror, optAsync){}; | ||
* @param {string} selector Selector to test. | ||
* @param {Element=} node Element to test the selector against. | ||
* @param {!Element=} node Element to test the selector against. | ||
* @return {boolean} | ||
@@ -1159,2 +1300,3 @@ */ | ||
* @param {Element=} node Node to target. Defaults to `this`. | ||
* @return {void} | ||
*/ | ||
@@ -1167,2 +1309,3 @@ Polymer_LegacyElementMixin.prototype.toggleAttribute = function(name, bool, node){}; | ||
* @param {Element=} node Node to target. Defaults to `this`. | ||
* @return {void} | ||
*/ | ||
@@ -1174,2 +1317,3 @@ Polymer_LegacyElementMixin.prototype.toggleClass = function(name, bool, node){}; | ||
Defaults to `this` | ||
* @return {void} | ||
*/ | ||
@@ -1183,6 +1327,7 @@ Polymer_LegacyElementMixin.prototype.transform = function(transformText, node){}; | ||
Defaults to `this`. | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype.translate3d = function(x, y, z, node){}; | ||
/** | ||
* @param {(string|!Array.<(number|string)>)} arrayOrPath Path to array from which to remove the item | ||
* @param {(string | !Array.<(number | string)>)} arrayOrPath Path to array from which to remove the item | ||
(or the array itself). | ||
@@ -1196,14 +1341,18 @@ * @param {*} item Item to remove. | ||
* @param {Array} args Array of strings or objects to log | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype._logger = function(level, args){}; | ||
/** | ||
* @param {...*} args | ||
* @param {...*} args Array of strings or objects to log | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype._log = function(args){}; | ||
/** | ||
* @param {...*} args | ||
* @param {...*} args Array of strings or objects to log | ||
* @return {void} | ||
*/ | ||
Polymer_LegacyElementMixin.prototype._warn = function(args){}; | ||
/** | ||
* @param {...*} args | ||
* @param {...*} args Array of strings or objects to log | ||
* @return {void} | ||
*/ | ||
@@ -1213,3 +1362,3 @@ Polymer_LegacyElementMixin.prototype._error = function(args){}; | ||
* @param {string} methodName Method name to associate with message | ||
* @param {...*} args | ||
* @param {...*} args Array of strings or objects to log | ||
* @return {Array} | ||
@@ -1254,3 +1403,3 @@ */ | ||
/** @type {?(Object|Array.<!Object>)} */ | ||
/** @type {?(Object | Array.<!Object>)} */ | ||
Polymer_ArraySelectorMixin.prototype.selected; | ||
@@ -1265,3 +1414,3 @@ | ||
/** | ||
* @return {undefined} | ||
* @return {void} | ||
*/ | ||
@@ -1281,2 +1430,3 @@ Polymer_ArraySelectorMixin.prototype.clearSelection = function(){}; | ||
* @param {*} item Item from `items` array to deselect | ||
* @return {void} | ||
*/ | ||
@@ -1286,2 +1436,3 @@ Polymer_ArraySelectorMixin.prototype.deselect = function(item){}; | ||
* @param {number} idx Index from `items` array to deselect | ||
* @return {void} | ||
*/ | ||
@@ -1291,2 +1442,3 @@ Polymer_ArraySelectorMixin.prototype.deselectIndex = function(idx){}; | ||
* @param {*} item Item from `items` array to select | ||
* @return {void} | ||
*/ | ||
@@ -1296,3 +1448,4 @@ Polymer_ArraySelectorMixin.prototype.select = function(item){}; | ||
* @param {number} idx Index from `items` array to select | ||
* @return {void} | ||
*/ | ||
Polymer_ArraySelectorMixin.prototype.selectIndex = function(idx){}; |
@@ -24,3 +24,3 @@ /** | ||
* notify: (boolean | undefined), | ||
* observer: (string | undefined) | ||
* observer: (string | function(*,*) | undefined) | ||
* }} | ||
@@ -63,2 +63,6 @@ */ | ||
let PropertiesMixinConstructor = function (){}; | ||
/** @type {(!PolymerElementProperties | undefined)} */ | ||
PropertiesMixinConstructor.properties; | ||
/** | ||
@@ -65,0 +69,0 @@ * @param {!PolymerInit} init |
@@ -24,3 +24,3 @@ /** | ||
StampedTemplate.prototype.nodeList; | ||
/** @type {!Object<string, !Node>} */ | ||
/** @type {!Object<string, !Element>} */ | ||
StampedTemplate.prototype.$; | ||
@@ -159,2 +159,9 @@ /** @type {!TemplateInfo | undefined} */ | ||
*/ | ||
let TemplatizeOptions; | ||
let TemplatizeOptions; | ||
/** @record */ | ||
function AsyncInterface(){} | ||
/** @type {function(!Function, number=): number} */ | ||
AsyncInterface.prototype.run; | ||
/** @type {function(number): void} */ | ||
AsyncInterface.prototype.cancel; |
@@ -19,3 +19,3 @@ /** | ||
const eslint = require('gulp-eslint'); | ||
const fs = require('fs'); | ||
const fs = require('fs-extra'); | ||
const path = require('path'); | ||
@@ -117,3 +117,3 @@ const mergeStream = require('merge-stream'); | ||
gulp.task('closure', ['clean'], () => { | ||
gulp.task('closure', ['generate-externs'], () => { | ||
@@ -265,13 +265,26 @@ let entry, splitRx, joinRx, addClosureTypes; | ||
gulp.task('generate-externs', ['clean'], () => { | ||
gulp.task('update-types', (done) => { | ||
runseq('generate-externs', 'generate-typescript', done); | ||
}); | ||
gulp.task('generate-externs', ['clean'], async () => { | ||
let genClosure = require('@polymer/gen-closure-declarations').generateDeclarations; | ||
return genClosure().then((declarations) => { | ||
fs.writeFileSync('externs/closure-types.js', `${header}${declarations}`); | ||
}); | ||
const declarations = await genClosure(); | ||
await fs.writeFile('externs/closure-types.js', `${header}${declarations}`); | ||
}); | ||
gulp.task('generate-typescript', async () => { | ||
let genTs = require('@polymer/gen-typescript-declarations').generateDeclarations; | ||
await del(['types/**/*.d.ts', '!types/extra-types.d.ts']); | ||
const config = await fs.readJson('gen-tsd.json'); | ||
const files = await genTs('.', config); | ||
for (const [filePath, contents] of files) { | ||
await fs.outputFile(path.join('types', filePath), contents); | ||
} | ||
}); | ||
gulp.task('update-version', () => { | ||
gulp.src('lib/utils/boot.html') | ||
return gulp.src('lib/utils/boot.html') | ||
.pipe(replace(/(window.Polymer.version = )'\d+\.\d+\.\d+'/, `$1'${require('./package.json').version}'`)) | ||
.pipe(gulp.dest('lib/utils')); | ||
}); | ||
}); |
{ | ||
"name": "@polymer/polymer", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "The Polymer library makes it easy to create your own web components. Give your element some markup and properties, and then use it on a site. Polymer provides features like dynamic templates and data binding to reduce the amount of boilerplate you need to write", | ||
@@ -12,4 +12,5 @@ "main": "polymer.html", | ||
"@polymer/gen-closure-declarations": "^0.4.0", | ||
"@polymer/gen-typescript-declarations": "^0.3.6", | ||
"@webcomponents/shadycss": "^1.1.0", | ||
"@webcomponents/webcomponentsjs": "^1.0.20", | ||
"@webcomponents/webcomponentsjs": "^1.0.22", | ||
"babel-preset-minify": "^0.2.0", | ||
@@ -19,2 +20,3 @@ "del": "^3.0.0", | ||
"eslint-plugin-html": "^4.0.1", | ||
"fs-extra": "^4.0.3", | ||
"google-closure-compiler": "^20171112.0.0", | ||
@@ -34,3 +36,3 @@ "gulp": "^3.9.1", | ||
"through2": "^2.0.0", | ||
"web-component-tester": "^6.4.1" | ||
"web-component-tester": "^6.5.0" | ||
}, | ||
@@ -41,3 +43,4 @@ "scripts": { | ||
"lint": "gulp lint", | ||
"version": "gulp update-version && git add lib/utils/boot.html" | ||
"version": "gulp update-version && git add lib/utils/boot.html", | ||
"update-types": "gulp update-types" | ||
}, | ||
@@ -44,0 +47,0 @@ "repository": { |
@@ -5,3 +5,16 @@ { | ||
"test-fixture/test-fixture.html" | ||
] | ||
], | ||
"plugins": { | ||
"local": { | ||
"browserOptions": { | ||
"chrome": [ | ||
"headless", | ||
"disable-gpu" | ||
], | ||
"firefox": [ | ||
"-headless" | ||
] | ||
} | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2784406
219
6911
24
1