| OLD | NEW |
| 1 /** | 1 /** |
| 2 * @fileoverview Closure compiler externs for the Polymer library. | 2 * @fileoverview Closure compiler externs for the Polymer library. |
| 3 * | 3 * |
| 4 * @externs | 4 * @externs |
| 5 * @license | 5 * @license |
| 6 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 6 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 7 * This code may only be used under the BSD style license found at | 7 * This code may only be used under the BSD style license found at |
| 8 * http://polymer.github.io/LICENSE.txt. The complete set of authors may be | 8 * http://polymer.github.io/LICENSE.txt. The complete set of authors may be |
| 9 * found at http://polymer.github.io/AUTHORS.txt. The complete set of | 9 * found at http://polymer.github.io/AUTHORS.txt. The complete set of |
| 10 * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code | 10 * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 */ | 34 */ |
| 35 PolymerElement.prototype.isAttached; | 35 PolymerElement.prototype.isAttached; |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * The root node of the element. | 38 * The root node of the element. |
| 39 * @type {!Node} | 39 * @type {!Node} |
| 40 */ | 40 */ |
| 41 PolymerElement.prototype.root; | 41 PolymerElement.prototype.root; |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * The root node for the element. |
| 45 * Only exists if running under Shady Dom. |
| 46 * You usually want to use `this.root`. |
| 47 * |
| 48 * @type {?Node|undefined} |
| 49 */ |
| 50 PolymerElement.prototype.shadyRoot; |
| 51 |
| 52 /** |
| 44 * Returns the first node in this element’s local DOM that matches selector. | 53 * Returns the first node in this element’s local DOM that matches selector. |
| 45 * @param {string} selector | 54 * @param {string} selector |
| 46 */ | 55 */ |
| 47 PolymerElement.prototype.$$ = function(selector) {}; | 56 PolymerElement.prototype.$$ = function(selector) {}; |
| 48 | 57 |
| 49 /** @type {string} The Custom element tag name. */ | 58 /** @type {string} The Custom element tag name. */ |
| 50 PolymerElement.prototype.is; | 59 PolymerElement.prototype.is; |
| 51 | 60 |
| 52 /** @type {string} The native element this element extends. */ | 61 /** @type {string} The native element this element extends. */ |
| 53 PolymerElement.prototype.extends; | 62 PolymerElement.prototype.extends; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 * @param {string} path Path to array. | 251 * @param {string} path Path to array. |
| 243 * @param {...*} var_args Items to insert info array | 252 * @param {...*} var_args Items to insert info array |
| 244 * @return {number} New length of the array. | 253 * @return {number} New length of the array. |
| 245 */ | 254 */ |
| 246 PolymerElement.prototype.unshift = function(path, var_args) {}; | 255 PolymerElement.prototype.unshift = function(path, var_args) {}; |
| 247 | 256 |
| 248 /** | 257 /** |
| 249 * Fire an event. | 258 * Fire an event. |
| 250 * | 259 * |
| 251 * @param {string} type An event name. | 260 * @param {string} type An event name. |
| 252 * @param {Object=} detail | 261 * @param {*=} detail |
| 253 * @param {{ | 262 * @param {{ |
| 254 * bubbles: (boolean|undefined), | 263 * bubbles: (boolean|undefined), |
| 255 * cancelable: (boolean|undefined), | 264 * cancelable: (boolean|undefined), |
| 256 * node: (!HTMLElement|undefined)}=} options | 265 * node: (!HTMLElement|undefined)}=} options |
| 257 * @return {Object} event | 266 * @return {Object} event |
| 258 */ | 267 */ |
| 259 PolymerElement.prototype.fire = function(type, detail, options) {}; | 268 PolymerElement.prototype.fire = function(type, detail, options) {}; |
| 260 | 269 |
| 261 /** | 270 /** |
| 262 * Toggles the named boolean class on the host element, adding the class if | 271 * Toggles the named boolean class on the host element, adding the class if |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 */ | 794 */ |
| 786 var TemplatizerNode = function() {}; | 795 var TemplatizerNode = function() {}; |
| 787 | 796 |
| 788 | 797 |
| 789 /** @type {?PolymerElement} */ | 798 /** @type {?PolymerElement} */ |
| 790 TemplatizerNode.prototype._templateInstance; | 799 TemplatizerNode.prototype._templateInstance; |
| 791 | 800 |
| 792 | 801 |
| 793 | 802 |
| 794 /** | 803 /** |
| 804 * @see https://github.com/Polymer/polymer/blob/master/src/lib/template/dom-repe
at.html |
| 805 * @extends {PolymerElement} |
| 806 * @constructor |
| 807 */ |
| 808 var DomRepeatElement = function() {}; |
| 809 |
| 810 |
| 811 /** |
| 812 * Forces the element to render its content. Normally rendering is |
| 813 * asynchronous to a provoking change. This is done for efficiency so |
| 814 * that multiple changes trigger only a single render. The render method |
| 815 * should be called if, for example, template rendering is required to |
| 816 * validate application state. |
| 817 */ |
| 818 DomRepeatElement.prototype.render = function() {}; |
| 819 |
| 820 |
| 821 /** |
| 822 * Returns the item associated with a given element stamped by |
| 823 * this `dom-repeat`. |
| 824 * |
| 825 * @param {!HTMLElement} el Element for which to return the item. |
| 826 * @return {*} Item associated with the element. |
| 827 */ |
| 828 DomRepeatElement.prototype.itemForElement = function(el) {}; |
| 829 |
| 830 |
| 831 /** |
| 832 * Returns the `Polymer.Collection` key associated with a given |
| 833 * element stamped by this `dom-repeat`. |
| 834 * |
| 835 * @param {!HTMLElement} el Element for which to return the key. |
| 836 * @return {*} Key associated with the element. |
| 837 */ |
| 838 DomRepeatElement.prototype.keyForElement = function(el) {}; |
| 839 |
| 840 |
| 841 /** |
| 842 * Returns the inst index for a given element stamped by this `dom-repeat`. |
| 843 * If `sort` is provided, the index will reflect the sorted order (rather |
| 844 * than the original array order). |
| 845 * |
| 846 * @param {!HTMLElement} el Element for which to return the index. |
| 847 * @return {*} Row index associated with the element (note this may |
| 848 * not correspond to the array index if a user `sort` is applied). |
| 849 */ |
| 850 DomRepeatElement.prototype.indexForElement = function(el) {}; |
| 851 |
| 852 |
| 853 |
| 854 /** |
| 795 * @see https://github.com/Polymer/polymer/blob/master/src/lib/template/array-se
lector.html | 855 * @see https://github.com/Polymer/polymer/blob/master/src/lib/template/array-se
lector.html |
| 796 * @extends {PolymerElement} | 856 * @extends {PolymerElement} |
| 797 * @constructor | 857 * @constructor |
| 798 */ | 858 */ |
| 799 var ArraySelectorElement = function() {}; | 859 var ArraySelectorElement = function() {}; |
| 800 | 860 |
| 801 | 861 |
| 802 /** | 862 /** |
| 803 * Returns whether the item is currently selected. | 863 * Returns whether the item is currently selected. |
| 804 * | 864 * |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 * @typedef {{ | 955 * @typedef {{ |
| 896 * indexSplices: ?Array<!PolymerSplice>, | 956 * indexSplices: ?Array<!PolymerSplice>, |
| 897 * keySplices: ?Array<!PolymerKeySplice> | 957 * keySplices: ?Array<!PolymerKeySplice> |
| 898 * }} | 958 * }} |
| 899 */ | 959 */ |
| 900 var PolymerSpliceChange; | 960 var PolymerSpliceChange; |
| 901 | 961 |
| 902 /** | 962 /** |
| 903 * The interface that iconsets should obey. Iconsets are registered by setting | 963 * The interface that iconsets should obey. Iconsets are registered by setting |
| 904 * their name in the IronMeta 'iconset' db, and a value of type Polymer.Iconset. | 964 * their name in the IronMeta 'iconset' db, and a value of type Polymer.Iconset. |
| 905 * | 965 * |
| 906 * Used by iron-icon but needs to live here since iron-icon, iron-iconset, etc d
on't | 966 * Used by iron-icon but needs to live here since iron-icon, iron-iconset, etc d
on't |
| 907 * depend on each other at all and talk only through iron-meta. | 967 * depend on each other at all and talk only through iron-meta. |
| 908 * | 968 * |
| 909 * @interface | 969 * @interface |
| 910 */ | 970 */ |
| 911 Polymer.Iconset = function() {}; | 971 Polymer.Iconset = function() {}; |
| 912 | 972 |
| 913 /** | 973 /** |
| 914 * Applies an icon to the given element as a css background image. This | 974 * Applies an icon to the given element as a css background image. This |
| 915 * method does not size the element, and it's usually necessary to set | 975 * method does not size the element, and it's usually necessary to set |
| 916 * the element's height and width so that the background image is visible. | 976 * the element's height and width so that the background image is visible. |
| 917 * | 977 * |
| 918 * @param {Element} element The element to which the icon is applied. | 978 * @param {Element} element The element to which the icon is applied. |
| 919 * @param {string} icon The name of the icon to apply. | 979 * @param {string} icon The name of the icon to apply. |
| 920 * @param {string=} theme (optional) The name or index of the icon to apply. | 980 * @param {string=} theme (optional) The name or index of the icon to apply. |
| 921 * @param {number=} scale (optional, defaults to 1) Icon scaling factor. | 981 * @param {number=} scale (optional, defaults to 1) Icon scaling factor. |
| 922 */ | 982 */ |
| 923 Polymer.Iconset.prototype.applyIcon = function( | 983 Polymer.Iconset.prototype.applyIcon = function( |
| 924 element, icon, theme, scale) {}; | 984 element, icon, theme, scale) {}; |
| OLD | NEW |