OLD | NEW |
| 1 // SSSSSSSSSSSSSSS TTTTTTTTTTTTTTTTTTTTTTT OOOOOOOOO PPPPPPPPPPPPPPPP
P |
| 2 // SS:::::::::::::::ST:::::::::::::::::::::T OO:::::::::OO P:::::::::::::::
:P |
| 3 // S:::::SSSSSS::::::ST:::::::::::::::::::::T OO:::::::::::::OO P::::::PPPPPP:::
::P |
| 4 // S:::::S SSSSSSST:::::TT:::::::TT:::::TO:::::::OOO:::::::OPP:::::P P::
:::P |
| 5 // S:::::S TTTTTT T:::::T TTTTTTO::::::O O::::::O P::::P P::
:::P |
| 6 // S:::::S T:::::T O:::::O O:::::O P::::P P::
:::P |
| 7 // S::::SSSS P::::PPPPPP:::
::P |
| 8 // SS::::::SSSSS This file is generated. To update it, P:::::::::::::
PP |
| 9 // SSS::::::::SS run roll_closure_compiler. P::::PPPPPPPPP |
| 10 // SSSSSS::::S P::::P |
| 11 // S:::::S T:::::T O:::::O O:::::O P::::P |
| 12 // S:::::S T:::::T O::::::O O::::::O P::::P |
| 13 // SSSSSSS S:::::S TT:::::::TT O:::::::OOO:::::::OPP::::::PP |
| 14 // S::::::SSSSSS:::::S T:::::::::T OO:::::::::::::OO P::::::::P |
| 15 // S:::::::::::::::SS T:::::::::T OO:::::::::OO P::::::::P |
| 16 // SSSSSSSSSSSSSSS TTTTTTTTTTT OOOOOOOOO PPPPPPPPPP |
| 17 /* |
| 18 * Copyright 2016 The Closure Compiler Authors. |
| 19 * |
| 20 * Licensed under the Apache License, Version 2.0 (the "License"); |
| 21 * you may not use this file except in compliance with the License. |
| 22 * You may obtain a copy of the License at |
| 23 * |
| 24 * http://www.apache.org/licenses/LICENSE-2.0 |
| 25 * |
| 26 * Unless required by applicable law or agreed to in writing, software |
| 27 * distributed under the License is distributed on an "AS IS" BASIS, |
| 28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 29 * See the License for the specific language governing permissions and |
| 30 * limitations under the License. |
| 31 */ |
1 /** | 32 /** |
2 * @fileoverview Closure compiler externs for the Polymer library. | 33 * @fileoverview Closure compiler externs for the Polymer library. |
| 34 * Originally part of the Polymer Project. Original license below. |
3 * | 35 * |
4 * @externs | 36 * @externs |
5 * @license | 37 * @license |
6 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 38 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
7 * This code may only be used under the BSD style license found at | 39 * 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 | 40 * 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 | 41 * 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 | 42 * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code |
11 * distributed by Google as part of the polymer project is also subject to an | 43 * distributed by Google as part of the polymer project is also subject to an |
12 * additional IP rights grant found at http://polymer.github.io/PATENTS.txt. | 44 * additional IP rights grant found at http://polymer.github.io/PATENTS.txt. |
13 */ | 45 */ |
14 | 46 |
15 /** | 47 /** |
16 * @param {!{is: string}} descriptor The Polymer descriptor of the element. | 48 * @param {!{is: string}} descriptor The Polymer descriptor of the element. |
17 * @see https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#custom-ele
ment-registration | 49 * @see https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#custom-ele
ment-registration |
18 */ | 50 */ |
19 var Polymer = function(descriptor) {}; | 51 var Polymer = function(descriptor) {}; |
20 | 52 |
21 | 53 |
| 54 /** |
| 55 * Re-evaluates and applies custom CSS properties based on dynamic |
| 56 * changes to this element's scope, such as adding or removing classes. |
| 57 * |
| 58 * For performance reasons, Polymer's custom CSS property shim relies |
| 59 * on this explicit signal from the user to indicate when changes have |
| 60 * been made that affect the values of custom properties. |
| 61 * |
| 62 * @param {Object=} properties Properties object which is mixed into |
| 63 * the document root `customStyle` property. This argument provides a |
| 64 * shortcut for setting `customStyle` and then calling `updateStyles`. |
| 65 * |
| 66 * @see http://polymer.github.io/polymer/ |
| 67 */ |
| 68 Polymer.updateStyles = function(properties) {}; |
| 69 |
| 70 |
22 /** @constructor @extends {HTMLElement} */ | 71 /** @constructor @extends {HTMLElement} */ |
23 var PolymerElement = function() {}; | 72 var PolymerElement = function() {}; |
24 | 73 |
25 /** | 74 /** |
26 * A mapping from ID to element in this Polymer Element's local DOM. | 75 * A mapping from ID to element in this Polymer Element's local DOM. |
27 * @type {!Object} | 76 * @type {!Object} |
28 */ | 77 */ |
29 PolymerElement.prototype.$; | 78 PolymerElement.prototype.$; |
30 | 79 |
31 /** | 80 /** |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 * Returns a string of text content that is the concatenation of the | 351 * Returns a string of text content that is the concatenation of the |
303 * text content's of the element's effective childNodes (the elements | 352 * text content's of the element's effective childNodes (the elements |
304 * returned by <a href="#getEffectiveChildNodes>getEffectiveChildNodes</a>. | 353 * returned by <a href="#getEffectiveChildNodes>getEffectiveChildNodes</a>. |
305 * | 354 * |
306 * @return {string} A concatenated string of all effective childNode text | 355 * @return {string} A concatenated string of all effective childNode text |
307 * content. | 356 * content. |
308 */ | 357 */ |
309 PolymerElement.prototype.getEffectiveTextContent = function() {}; | 358 PolymerElement.prototype.getEffectiveTextContent = function() {}; |
310 | 359 |
311 /** | 360 /** |
| 361 * Returns the first effective child that match selector. |
| 362 * |
312 * @param {string} selector | 363 * @param {string} selector |
313 * @return {?HTMLElement} | 364 * @return {?HTMLElement} |
314 */ | 365 */ |
315 PolymerElement.prototype.queryEffectiveChildren = function(selector) {}; | 366 PolymerElement.prototype.queryEffectiveChildren = function(selector) {}; |
316 | 367 |
317 /** | 368 /** |
| 369 * Returns a list of effective children that match selector. |
| 370 * |
| 371 * @param {string} selector |
| 372 * @return {!Array<!HTMLElement>} |
| 373 */ |
| 374 PolymerElement.prototype.queryAllEffectiveChildren = function(selector) {}; |
| 375 |
| 376 /** |
318 * Fire an event. | 377 * Fire an event. |
319 * | 378 * |
320 * @param {string} type An event name. | 379 * @param {string} type An event name. |
321 * @param {*=} detail | 380 * @param {*=} detail |
322 * @param {{ | 381 * @param {{ |
323 * bubbles: (boolean|undefined), | 382 * bubbles: (boolean|undefined), |
324 * cancelable: (boolean|undefined), | 383 * cancelable: (boolean|undefined), |
325 * node: (!EventTarget|undefined)}=} options | 384 * node: (!EventTarget|undefined)}=} options |
326 * @return {Object} event | 385 * @return {Object} event |
327 */ | 386 */ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 /** | 491 /** |
433 * Used by the promise-polyfill on its own. | 492 * Used by the promise-polyfill on its own. |
434 * | 493 * |
435 * @param {!Function} method | 494 * @param {!Function} method |
436 * @param {number=} wait | 495 * @param {number=} wait |
437 * @return {number} A handle which can be used to cancel the job. | 496 * @return {number} A handle which can be used to cancel the job. |
438 */ | 497 */ |
439 Polymer.Base.async = function(method, wait) {}; | 498 Polymer.Base.async = function(method, wait) {}; |
440 | 499 |
441 /** | 500 /** |
| 501 * Copies own properties (including accessor descriptors) from a source |
| 502 * object to a target object. |
| 503 * |
| 504 * @param {?Object} target Target object to copy properties to. |
| 505 * @param {?Object} source Source object to copy properties from. |
| 506 * @return {?Object} Target object that was passed as first argument or source |
| 507 * object if the target was null. |
| 508 */ |
| 509 Polymer.Base.extend = function(target, source) {}; |
| 510 |
| 511 /** |
442 * Returns a property descriptor object for the property specified. | 512 * Returns a property descriptor object for the property specified. |
443 * | 513 * |
444 * This method allows introspecting the configuration of a Polymer element's | 514 * This method allows introspecting the configuration of a Polymer element's |
445 * properties as configured in its `properties` object. Note, this method | 515 * properties as configured in its `properties` object. Note, this method |
446 * normalizes shorthand forms of the `properties` object into longhand form. | 516 * normalizes shorthand forms of the `properties` object into longhand form. |
447 * | 517 * |
448 * @param {string} property Name of property to introspect. | 518 * @param {string} property Name of property to introspect. |
449 * @return {Object} Property descriptor for specified property. | 519 * @return {Object} Property descriptor for specified property. |
450 */ | 520 */ |
451 Polymer.Base.getPropertyInfo = function(property) {}; | 521 Polymer.Base.getPropertyInfo = function(property) {}; |
452 | 522 |
| 523 /** |
| 524 * Copies props from a source object to a target object. |
| 525 * |
| 526 * Note, this method uses a simple `for...in` strategy for enumerating |
| 527 * properties. To ensure only `ownProperties` are copied from source |
| 528 * to target and that accessor implementations are copied, use `extend`. |
| 529 * |
| 530 * @param {!Object} target Target object to copy properties to. |
| 531 * @param {?Object} source Source object to copy properties from. |
| 532 * @return {!Object} Target object that was passed as first argument. |
| 533 */ |
| 534 Polymer.Base.mixin = function(target, source) {}; |
| 535 |
453 Polymer.Gestures; | 536 Polymer.Gestures; |
454 | 537 |
455 /** | 538 /** |
456 * Gets the original target of the given event. | 539 * Gets the original target of the given event. |
457 * | 540 * |
458 * Cheaper than Polymer.dom(ev).path[0]; | 541 * Cheaper than Polymer.dom(ev).path[0]; |
459 * See https://github.com/Polymer/polymer/blob/master/src/standard/gestures.html
#L191 | 542 * See https://github.com/Polymer/polymer/blob/master/src/standard/gestures.html
#L191 |
460 * | 543 * |
461 * @param {Event} ev . | 544 * @param {Event} ev . |
462 * @return {Element} The original target of the event. | 545 * @return {Element} The original target of the event. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 /** | 653 /** |
571 * Returns the computed style value for the given property. | 654 * Returns the computed style value for the given property. |
572 * @param {string} property | 655 * @param {string} property |
573 * @return {string} the computed value | 656 * @return {string} the computed value |
574 */ | 657 */ |
575 PolymerElement.prototype.getComputedStyleValue = function(property) {}; | 658 PolymerElement.prototype.getComputedStyleValue = function(property) {}; |
576 | 659 |
577 /** | 660 /** |
578 * Logs a message to the console. | 661 * Logs a message to the console. |
579 * | 662 * |
580 * @param {!Array} var_args | 663 * @param {...*} var_args |
581 * @protected | 664 * @protected |
582 */ | 665 */ |
583 PolymerElement.prototype._log = function(var_args) {}; | 666 PolymerElement.prototype._log = function(var_args) {}; |
584 | 667 |
585 /** | 668 /** |
586 * Logs a message to the console with a 'warn' level. | 669 * Logs a message to the console with a 'warn' level. |
587 * | 670 * |
588 * @param {!Array} var_args | 671 * @param {...*} var_args |
589 * @protected | 672 * @protected |
590 */ | 673 */ |
591 PolymerElement.prototype._warn = function(var_args) {}; | 674 PolymerElement.prototype._warn = function(var_args) {}; |
592 | 675 |
593 /** | 676 /** |
594 * Logs a message to the console with an 'error' level. | 677 * Logs a message to the console with an 'error' level. |
595 * | 678 * |
596 * @param {!Array} var_args | 679 * @param {...*} var_args |
597 * @protected | 680 * @protected |
598 */ | 681 */ |
599 PolymerElement.prototype._error = function(var_args) {}; | 682 PolymerElement.prototype._error = function(var_args) {}; |
600 | 683 |
601 /** | 684 /** |
602 * Formats string arguments together for a console log. | 685 * Formats string arguments together for a console log. |
603 * | 686 * |
604 * @param {...*} var_args | 687 * @param {...*} var_args |
605 * @return {!Array} The formatted array of args to a log function. | 688 * @return {!Array} The formatted array of args to a log function. |
606 * @protected | 689 * @protected |
607 */ | 690 */ |
608 PolymerElement.prototype._logf = function(var_args) {}; | 691 PolymerElement.prototype._logf = function(var_args) {}; |
609 | 692 |
| 693 /** @type {boolean} True after this.ready() has run */ |
| 694 PolymerElement.prototype._readied; |
| 695 |
| 696 /** |
| 697 * Do not call this function. |
| 698 * |
| 699 * @param {string} path . |
| 700 * @param {*} value . |
| 701 */ |
| 702 PolymerElement.prototype._notifyPathUp = function(path, value) {}; |
| 703 |
| 704 /** |
| 705 * Do not call this function. |
| 706 * |
| 707 * @param {string} path . |
| 708 * @param {*} value . |
| 709 */ |
| 710 PolymerElement.prototype._pathEffector = function(path, value) {}; |
| 711 |
| 712 /** |
| 713 * Do not call this function. |
| 714 * |
| 715 * @param {string} path . |
| 716 * @param {*} value . |
| 717 */ |
| 718 PolymerElement.prototype._propertySetter = function(path, value) {}; |
| 719 |
610 | 720 |
611 /** | 721 /** |
612 * A Polymer DOM API for manipulating DOM such that local DOM and light DOM | 722 * A Polymer DOM API for manipulating DOM such that local DOM and light DOM |
613 * trees are properly maintained. | 723 * trees are properly maintained. |
614 * | 724 * |
615 * @constructor | 725 * @constructor |
616 */ | 726 */ |
617 var PolymerDomApi = function() {}; | 727 var PolymerDomApi = function() {}; |
618 | 728 |
619 /** | 729 /** |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 | 876 |
767 /** @type {?EventTarget} */ | 877 /** @type {?EventTarget} */ |
768 PolymerEventApi.prototype.rootTarget; | 878 PolymerEventApi.prototype.rootTarget; |
769 | 879 |
770 /** @type {?EventTarget} */ | 880 /** @type {?EventTarget} */ |
771 PolymerEventApi.prototype.localTarget; | 881 PolymerEventApi.prototype.localTarget; |
772 | 882 |
773 /** @type {?Array<!Element>|undefined} */ | 883 /** @type {?Array<!Element>|undefined} */ |
774 PolymerEventApi.prototype.path; | 884 PolymerEventApi.prototype.path; |
775 | 885 |
| 886 /** @type {Event} */ |
| 887 PolymerEventApi.prototype.event; |
| 888 |
776 | 889 |
777 Polymer.Async; | 890 Polymer.Async; |
778 | 891 |
779 /** | 892 /** |
780 * polymer-onerror experiment relies on this private API, so expose it only | 893 * polymer-onerror experiment relies on this private API, so expose it only |
781 * to let the compilation work. Do not use in user code. | 894 * to let the compilation work. Do not use in user code. |
782 */ | 895 */ |
783 Polymer.Async._atEndOfMicrotask = function() {}; | 896 Polymer.Async._atEndOfMicrotask = function() {}; |
784 | 897 |
785 | 898 |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 | 1252 |
1140 /** | 1253 /** |
1141 * @typedef {{ | 1254 * @typedef {{ |
1142 * indexSplices: ?Array<!PolymerSplice>, | 1255 * indexSplices: ?Array<!PolymerSplice>, |
1143 * keySplices: ?Array<!PolymerKeySplice> | 1256 * keySplices: ?Array<!PolymerKeySplice> |
1144 * }} | 1257 * }} |
1145 */ | 1258 */ |
1146 var PolymerSpliceChange; | 1259 var PolymerSpliceChange; |
1147 | 1260 |
1148 /** | 1261 /** |
| 1262 * The type of the object received by an observer function when deep |
| 1263 * sub-property observation is enabled. See: |
| 1264 * https://www.polymer-project.org/1.0/docs/devguide/properties.html#deep-observ
ation |
| 1265 * |
| 1266 * @typedef {{ |
| 1267 * path: string, |
| 1268 * value: (?Object|undefined), |
| 1269 * base: (?Object|undefined) |
| 1270 * }} |
| 1271 */ |
| 1272 var PolymerDeepPropertyChange; |
| 1273 |
| 1274 /** |
1149 * The interface that iconsets should obey. Iconsets are registered by setting | 1275 * The interface that iconsets should obey. Iconsets are registered by setting |
1150 * their name in the IronMeta 'iconset' db, and a value of type Polymer.Iconset. | 1276 * their name in the IronMeta 'iconset' db, and a value of type Polymer.Iconset. |
1151 * | 1277 * |
1152 * Used by iron-icon but needs to live here since iron-icon, iron-iconset, etc d
on't | 1278 * Used by iron-icon but needs to live here since iron-icon, iron-iconset, etc d
on't |
1153 * depend on each other at all and talk only through iron-meta. | 1279 * depend on each other at all and talk only through iron-meta. |
1154 * | 1280 * |
1155 * @interface | 1281 * @interface |
1156 */ | 1282 */ |
1157 Polymer.Iconset = function() {}; | 1283 Polymer.Iconset = function() {}; |
1158 | 1284 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 */ | 1326 */ |
1201 Polymer.RenderStatus.whenReady = function(cb) {} | 1327 Polymer.RenderStatus.whenReady = function(cb) {} |
1202 | 1328 |
1203 /** | 1329 /** |
1204 * Queue up function call on next render. | 1330 * Queue up function call on next render. |
1205 * @param {!Element} element The element on which the function call is made. | 1331 * @param {!Element} element The element on which the function call is made. |
1206 * @param {!function()} fn The function called on next render. | 1332 * @param {!function()} fn The function called on next render. |
1207 * @param {...*} args The function arguments. | 1333 * @param {...*} args The function arguments. |
1208 */ | 1334 */ |
1209 Polymer.RenderStatus.afterNextRender = function(element, fn, args) {} | 1335 Polymer.RenderStatus.afterNextRender = function(element, fn, args) {} |
1210 | |
1211 Polymer.AppLayout; | |
1212 | |
1213 /** @constructor */ | |
1214 Polymer.AppLayout.LocalDomWithBackground = function(){}; | |
1215 /** @type {!HTMLElement} */ | |
1216 Polymer.AppLayout.LocalDomWithBackground.prototype.backgroundFrontLayer; | |
1217 /** @type {!HTMLElement} */ | |
1218 Polymer.AppLayout.LocalDomWithBackground.prototype.backgroundRearLayer; | |
1219 /** @type {!HTMLElement} */ | |
1220 Polymer.AppLayout.LocalDomWithBackground.prototype.background; | |
1221 | |
1222 /** | |
1223 * @constructor | |
1224 * @extends {PolymerElement} | |
1225 */ | |
1226 Polymer.AppLayout.ElementWithBackground = function(){}; | |
1227 | |
1228 // TODO(garlicnation): Follow up with app-layout team and remove private api fro
m this prototype | |
1229 Polymer.AppLayout.ElementWithBackground.prototype = { | |
1230 /** @type {!Polymer.AppLayout.LocalDomWithBackground} */ | |
1231 $: null, | |
1232 /** @return {boolean} True if there's content below the current element */ | |
1233 isContentBelow: function(){}, | |
1234 /** Updates the elements scroll state */ | |
1235 _updateScrollState: function(){}, | |
1236 /** @return {boolean} true if the element is on screen */ | |
1237 isOnScreen: function(){}, | |
1238 /** @type {number} Internal bookkeeping to track screen position */ | |
1239 _deltaHeight: 0, | |
1240 } | |
OLD | NEW |