| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 * (if set) on oldNode and setting it on newNode. | 283 * (if set) on oldNode and setting it on newNode. |
| 284 * @param {string} name | 284 * @param {string} name |
| 285 * @param {!HTMLElement} newNode | 285 * @param {!HTMLElement} newNode |
| 286 * @param {!HTMLElement} oldNode | 286 * @param {!HTMLElement} oldNode |
| 287 */ | 287 */ |
| 288 PolymerElement.prototype.attributeFollows = function(name, newNode, oldNode) {}; | 288 PolymerElement.prototype.attributeFollows = function(name, newNode, oldNode) {}; |
| 289 | 289 |
| 290 /** | 290 /** |
| 291 * Convenience method to add an event listener on a given element, late bound to | 291 * Convenience method to add an event listener on a given element, late bound to |
| 292 * a named method on this element. | 292 * a named method on this element. |
| 293 * @param {!Element} node Element to add event listener to. | 293 * @param {!EventTarget} node Element to add event listener to. |
| 294 * @param {string} eventName Name of event to listen for. | 294 * @param {string} eventName Name of event to listen for. |
| 295 * @param {string} methodName Name of handler method on this to call. | 295 * @param {string} methodName Name of handler method on this to call. |
| 296 */ | 296 */ |
| 297 PolymerElement.prototype.listen = function(node, eventName, methodName) {}; | 297 PolymerElement.prototype.listen = function(node, eventName, methodName) {}; |
| 298 | 298 |
| 299 /** | 299 /** |
| 300 * Convenience method to remove an event listener from a given element. | 300 * Convenience method to remove an event listener from a given element. |
| 301 * @param {!Element} node Element to remove event listener from. | 301 * @param {!EventTarget} node Element to remove event listener from. |
| 302 * @param {string} eventName Name of event to stop listening for. | 302 * @param {string} eventName Name of event to stop listening for. |
| 303 * @param {string} methodName Name of handler method on this to remove. | 303 * @param {string} methodName Name of handler method on this to remove. |
| 304 */ | 304 */ |
| 305 PolymerElement.prototype.unlisten = function(node, eventName, methodName) {}; | 305 PolymerElement.prototype.unlisten = function(node, eventName, methodName) {}; |
| 306 | 306 |
| 307 /** | 307 /** |
| 308 * Override scrolling behavior to all direction, one direction, or none. | 308 * Override scrolling behavior to all direction, one direction, or none. |
| 309 * | 309 * |
| 310 * Valid scroll directions: | 310 * Valid scroll directions: |
| 311 * 'all': scroll in any direction | 311 * 'all': scroll in any direction |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 * on this explicit signal from the user to indicate when changes have | 453 * on this explicit signal from the user to indicate when changes have |
| 454 * been made that affect the values of custom properties. | 454 * been made that affect the values of custom properties. |
| 455 * | 455 * |
| 456 * @param {Object=} properties Properties object which, if provided is mixed | 456 * @param {Object=} properties Properties object which, if provided is mixed |
| 457 * into the element's `customStyle` property. This argument provides a | 457 * into the element's `customStyle` property. This argument provides a |
| 458 * shortcut for setting `customStyle` and then calling `updateStyles`. | 458 * shortcut for setting `customStyle` and then calling `updateStyles`. |
| 459 */ | 459 */ |
| 460 PolymerElement.prototype.updateStyles = function(properties) {}; | 460 PolymerElement.prototype.updateStyles = function(properties) {}; |
| 461 | 461 |
| 462 /** | 462 /** |
| 463 * @type {!Object<string, string|undefined>} |
| 464 */ |
| 465 PolymerElement.prototype.customStyle; |
| 466 |
| 467 /** |
| 463 * Logs a message to the console. | 468 * Logs a message to the console. |
| 464 * | 469 * |
| 465 * @param {!Array} var_args | 470 * @param {!Array} var_args |
| 466 * @protected | 471 * @protected |
| 467 */ | 472 */ |
| 468 PolymerElement.prototype._log = function(var_args) {}; | 473 PolymerElement.prototype._log = function(var_args) {}; |
| 469 | 474 |
| 470 /** | 475 /** |
| 471 * Logs a message to the console with a 'warn' level. | 476 * Logs a message to the console with a 'warn' level. |
| 472 * | 477 * |
| (...skipping 25 matching lines...) Expand all Loading... |
| 498 * trees are properly maintained. | 503 * trees are properly maintained. |
| 499 * | 504 * |
| 500 * @constructor | 505 * @constructor |
| 501 */ | 506 */ |
| 502 var PolymerDomApi = function() {}; | 507 var PolymerDomApi = function() {}; |
| 503 | 508 |
| 504 /** @param {!Node} node */ | 509 /** @param {!Node} node */ |
| 505 PolymerDomApi.prototype.appendChild = function(node) {}; | 510 PolymerDomApi.prototype.appendChild = function(node) {}; |
| 506 | 511 |
| 507 /** | 512 /** |
| 513 * @param {!Node} oldNode |
| 514 * @param {!Node} newNode |
| 515 */ |
| 516 PolymerDomApi.prototype.replaceChild = function(oldNode, newNode) {}; |
| 517 |
| 518 /** |
| 508 * @param {!Node} node | 519 * @param {!Node} node |
| 509 * @param {!Node} beforeNode | 520 * @param {!Node} beforeNode |
| 510 */ | 521 */ |
| 511 PolymerDomApi.prototype.insertBefore = function(node, beforeNode) {}; | 522 PolymerDomApi.prototype.insertBefore = function(node, beforeNode) {}; |
| 512 | 523 |
| 513 /** @param {!Node} node */ | 524 /** @param {!Node} node */ |
| 514 PolymerDomApi.prototype.removeChild = function(node) {}; | 525 PolymerDomApi.prototype.removeChild = function(node) {}; |
| 515 | 526 |
| 516 /** @type {!Array<!Node>} */ | 527 /** @type {!Array<!Node>} */ |
| 517 PolymerDomApi.prototype.childNodes; | 528 PolymerDomApi.prototype.childNodes; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 */ | 888 */ |
| 878 var PolymerKeySplice; | 889 var PolymerKeySplice; |
| 879 | 890 |
| 880 /** | 891 /** |
| 881 * @typedef {{ | 892 * @typedef {{ |
| 882 * indexSplices: ?Array<!PolymerSplice>, | 893 * indexSplices: ?Array<!PolymerSplice>, |
| 883 * keySplices: ?Array<!PolymerKeySplice> | 894 * keySplices: ?Array<!PolymerKeySplice> |
| 884 * }} | 895 * }} |
| 885 */ | 896 */ |
| 886 var PolymerSpliceChange; | 897 var PolymerSpliceChange; |
| 898 |
| 899 /** |
| 900 * The interface that iconsets should obey. Iconsets are registered by setting |
| 901 * their name in the IronMeta 'iconset' db, and a value of type Polymer.Iconset. |
| 902 * |
| 903 * Used by iron-icon but needs to live here since iron-icon, iron-iconset, etc d
on't |
| 904 * depend on each other at all and talk only through iron-meta. |
| 905 * |
| 906 * @interface |
| 907 */ |
| 908 Polymer.Iconset = function() {}; |
| 909 |
| 910 /** |
| 911 * Applies an icon to the given element as a css background image. This |
| 912 * method does not size the element, and it's usually necessary to set |
| 913 * the element's height and width so that the background image is visible. |
| 914 * |
| 915 * @param {Element} element The element to which the icon is applied. |
| 916 * @param {string} icon The name of the icon to apply. |
| 917 * @param {string=} theme (optional) The name or index of the icon to apply. |
| 918 * @param {number=} scale (optional, defaults to 1) Icon scaling factor. |
| 919 */ |
| 920 Polymer.Iconset.prototype.applyIcon = function( |
| 921 element, icon, theme, scale) {}; |
| OLD | NEW |