| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 * observers in that the change handler is called asynchronously. | 65 * observers in that the change handler is called asynchronously. |
| 66 * | 66 * |
| 67 * @type {!Object<string, string>|undefined} | 67 * @type {!Object<string, string>|undefined} |
| 68 */ | 68 */ |
| 69 PolymerElement.prototype.observers; | 69 PolymerElement.prototype.observers; |
| 70 | 70 |
| 71 /** On create callback. */ | 71 /** On create callback. */ |
| 72 PolymerElement.prototype.created = function() {}; | 72 PolymerElement.prototype.created = function() {}; |
| 73 /** On ready callback. */ | 73 /** On ready callback. */ |
| 74 PolymerElement.prototype.ready = function() {}; | 74 PolymerElement.prototype.ready = function() {}; |
| 75 /** On registered callback. */ |
| 76 PolymerElement.prototype.registered = function() {}; |
| 75 /** On attached to the DOM callback. */ | 77 /** On attached to the DOM callback. */ |
| 76 PolymerElement.prototype.attached = function() {}; | 78 PolymerElement.prototype.attached = function() {}; |
| 77 /** On detached from the DOM callback. */ | 79 /** On detached from the DOM callback. */ |
| 78 PolymerElement.prototype.detached = function() {}; | 80 PolymerElement.prototype.detached = function() {}; |
| 79 | 81 |
| 80 /** | 82 /** |
| 81 * Callback fired when an attribute on the element has been changed. | 83 * Callback fired when an attribute on the element has been changed. |
| 82 * | 84 * |
| 83 * @param {string} name The name of the attribute that changed. | 85 * @param {string} name The name of the attribute that changed. |
| 84 */ | 86 */ |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 */ | 231 */ |
| 230 PolymerElement.prototype.setScrollDirection = function(direction, node) {}; | 232 PolymerElement.prototype.setScrollDirection = function(direction, node) {}; |
| 231 | 233 |
| 232 /** | 234 /** |
| 233 * @param {!Function} method | 235 * @param {!Function} method |
| 234 * @param {number=} wait | 236 * @param {number=} wait |
| 235 * @return {number} A handle which can be used to cancel the job. | 237 * @return {number} A handle which can be used to cancel the job. |
| 236 */ | 238 */ |
| 237 PolymerElement.prototype.async = function(method, wait) {}; | 239 PolymerElement.prototype.async = function(method, wait) {}; |
| 238 | 240 |
| 241 /** |
| 242 * @param {...*} var_args |
| 243 */ |
| 244 PolymerElement.prototype.factoryImpl = function(var_args) {}; |
| 245 |
| 239 Polymer.Base; | 246 Polymer.Base; |
| 240 | 247 |
| 241 /** | 248 /** |
| 242 * Used by the promise-polyfill on its own. | 249 * Used by the promise-polyfill on its own. |
| 243 * | 250 * |
| 244 * @param {!Function} method | 251 * @param {!Function} method |
| 245 * @param {number=} wait | 252 * @param {number=} wait |
| 246 * @return {number} A handle which can be used to cancel the job. | 253 * @return {number} A handle which can be used to cancel the job. |
| 247 */ | 254 */ |
| 248 Polymer.Base.async = function(method, wait) {}; | 255 Polymer.Base.async = function(method, wait) {}; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 PolymerDomApi.prototype.innerHTML; | 413 PolymerDomApi.prototype.innerHTML; |
| 407 | 414 |
| 408 /** | 415 /** |
| 409 * @param {string} selector | 416 * @param {string} selector |
| 410 * @return {?HTMLElement} | 417 * @return {?HTMLElement} |
| 411 */ | 418 */ |
| 412 PolymerDomApi.prototype.querySelector = function(selector) {}; | 419 PolymerDomApi.prototype.querySelector = function(selector) {}; |
| 413 | 420 |
| 414 /** | 421 /** |
| 415 * @param {string} selector | 422 * @param {string} selector |
| 416 * @return {!Array<?HTMLElement>} | 423 * @return {!Array<!HTMLElement>} |
| 417 */ | 424 */ |
| 418 PolymerDomApi.prototype.querySelectorAll = function(selector) {}; | 425 PolymerDomApi.prototype.querySelectorAll = function(selector) {}; |
| 419 | 426 |
| 420 /** @return {!Array<!Node>} */ | 427 /** @return {!Array<!Node>} */ |
| 421 PolymerDomApi.prototype.getDistributedNodes = function() {}; | 428 PolymerDomApi.prototype.getDistributedNodes = function() {}; |
| 422 | 429 |
| 423 /** @return {!Array<!Node>} */ | 430 /** @return {!Array<!Node>} */ |
| 424 PolymerDomApi.prototype.getDestinationInsertionPoints = function() {}; | 431 PolymerDomApi.prototype.getDestinationInsertionPoints = function() {}; |
| 425 | 432 |
| 426 /** @return {?Node} */ | 433 /** @return {?Node} */ |
| 427 PolymerDomApi.prototype.getOwnerRoot = function() {}; | 434 PolymerDomApi.prototype.getOwnerRoot = function() {}; |
| 428 | 435 |
| 429 /** | 436 /** |
| 430 * @param {string} attribute | 437 * @param {string} attribute |
| 431 * @param {string|number|boolean} value Values are converted to strings with | 438 * @param {string|number|boolean} value Values are converted to strings with |
| 432 * ToString, so we accept number and boolean since both convert easily to | 439 * ToString, so we accept number and boolean since both convert easily to |
| 433 * strings. | 440 * strings. |
| 434 */ | 441 */ |
| 435 PolymerDomApi.prototype.setAttribute = function(attribute, value) {}; | 442 PolymerDomApi.prototype.setAttribute = function(attribute, value) {}; |
| 436 | 443 |
| 437 /** @param {string} attribute */ | 444 /** @param {string} attribute */ |
| 438 PolymerDomApi.prototype.removeAttribute = function(attribute) {}; | 445 PolymerDomApi.prototype.removeAttribute = function(attribute) {}; |
| 439 | 446 |
| 440 /** @type {?DOMTokenList} */ | 447 /** @type {?DOMTokenList} */ |
| 441 PolymerDomApi.prototype.classList; | 448 PolymerDomApi.prototype.classList; |
| 442 | 449 |
| 443 /** | 450 /** |
| 451 * @param {string} selector |
| 452 * @return {!Array<!HTMLElement>} |
| 453 */ |
| 454 PolymerDomApi.prototype.queryDistributedElements = function(selector) {}; |
| 455 |
| 456 /** |
| 444 * A Polymer Event API. | 457 * A Polymer Event API. |
| 445 * | 458 * |
| 446 * @constructor | 459 * @constructor |
| 447 */ | 460 */ |
| 448 var PolymerEventApi = function() {}; | 461 var PolymerEventApi = function() {}; |
| 449 | 462 |
| 450 /** @type {?EventTarget} */ | 463 /** @type {?EventTarget} */ |
| 451 PolymerEventApi.prototype.rootTarget; | 464 PolymerEventApi.prototype.rootTarget; |
| 452 | 465 |
| 453 /** @type {?EventTarget} */ | 466 /** @type {?EventTarget} */ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 478 | 491 |
| 479 /** | 492 /** |
| 480 * Convert a string from camel-case to dash format. | 493 * Convert a string from camel-case to dash format. |
| 481 * @param {string} camel | 494 * @param {string} camel |
| 482 * @return {string} The string in dash format. | 495 * @return {string} The string in dash format. |
| 483 */ | 496 */ |
| 484 Polymer.CaseMap.camelToDashCase = function(camel) {}; | 497 Polymer.CaseMap.camelToDashCase = function(camel) {}; |
| 485 | 498 |
| 486 | 499 |
| 487 /** | 500 /** |
| 501 * Settings pulled from |
| 502 * https://github.com/Polymer/polymer/blob/master/src/lib/settings.html |
| 503 */ |
| 504 Polymer.Settings; |
| 505 |
| 506 /** @type {boolean} */ |
| 507 Polymer.Settings.wantShadow; |
| 508 |
| 509 /** @type {boolean} */ |
| 510 Polymer.Settings.hasShadow; |
| 511 |
| 512 /** @type {boolean} */ |
| 513 Polymer.Settings.nativeShadow; |
| 514 |
| 515 /** @type {boolean} */ |
| 516 Polymer.Settings.useShadow; |
| 517 |
| 518 /** @type {boolean} */ |
| 519 Polymer.Settings.useNativeShadow; |
| 520 |
| 521 /** @type {boolean} */ |
| 522 Polymer.Settings.useNativeImports; |
| 523 |
| 524 /** @type {boolean} */ |
| 525 Polymer.Settings.useNativeCustomElements; |
| 526 |
| 527 |
| 528 /** |
| 488 * An Event type fired when moving while finger/button is down. | 529 * An Event type fired when moving while finger/button is down. |
| 489 * state - a string indicating the tracking state: | 530 * state - a string indicating the tracking state: |
| 490 * + start: fired when tracking is first detected (finger/button down and | 531 * + start: fired when tracking is first detected (finger/button down and |
| 491 * moved past a pre-set distance threshold) | 532 * moved past a pre-set distance threshold) |
| 492 * + track: fired while tracking | 533 * + track: fired while tracking |
| 493 * + end: fired when tracking ends | 534 * + end: fired when tracking ends |
| 494 * x - clientX coordinate for event | 535 * x - clientX coordinate for event |
| 495 * y - clientY coordinate for event | 536 * y - clientY coordinate for event |
| 496 * dx - change in pixels horizontally since the first track event | 537 * dx - change in pixels horizontally since the first track event |
| 497 * dy - change in pixels vertically since the first track event | 538 * dy - change in pixels vertically since the first track event |
| (...skipping 21 matching lines...) Expand all Loading... |
| 519 * y - clientY coordinate for event | 560 * y - clientY coordinate for event |
| 520 * sourceEvent - the original DOM event that caused the down action | 561 * sourceEvent - the original DOM event that caused the down action |
| 521 * | 562 * |
| 522 * @typedef {{ | 563 * @typedef {{ |
| 523 * x: number, | 564 * x: number, |
| 524 * y: number, | 565 * y: number, |
| 525 * sourceEvent: Event | 566 * sourceEvent: Event |
| 526 * }} | 567 * }} |
| 527 */ | 568 */ |
| 528 var PolymerTouchEvent; | 569 var PolymerTouchEvent; |
| OLD | NEW |