|
129 | 129 | * @param {string} name Name of attribute.
|
130 | 130 | * @param {?string} old Old value of attribute.
|
131 | 131 | * @param {?string} value Current value of attribute.
|
| 132 | + * @returns {void} |
132 | 133 | * @override
|
133 | 134 | */
|
134 | 135 | attributeChangedCallback(name, old, value) {
|
|
484 | 485 | * any `<content>` elements are replaced with the list of nodes distributed
|
485 | 486 | * to the `<content>`, the result of its `getDistributedNodes` method.
|
486 | 487 | * @this {Element}
|
487 |
| - * @return {Array<Node>} List of effective child nodes. |
| 488 | + * @return {!Array<!Node>} List of effective child nodes. |
488 | 489 | */
|
489 | 490 | getEffectiveChildNodes() {
|
490 | 491 | const domApi = /** @type {Polymer.DomApi} */(Polymer.dom(this));
|
|
497 | 498 | * children that are insertion points.
|
498 | 499 | * @param {string} selector Selector to run.
|
499 | 500 | * @this {Element}
|
500 |
| - * @return {Array<Node>} List of distributed elements that match selector. |
| 501 | + * @return {!Array<!Node>} List of distributed elements that match selector. |
501 | 502 | */
|
502 | 503 | queryDistributedElements(selector) {
|
503 | 504 | const domApi = /** @type {Polymer.DomApi} */(Polymer.dom(this));
|
|
510 | 511 | * any `<content>` elements are replaced with the list of elements
|
511 | 512 | * distributed to the `<content>`.
|
512 | 513 | *
|
513 |
| - * @return {Array<Node>} List of effective children. |
| 514 | + * @return {!Array<!Node>} List of effective children. |
514 | 515 | */
|
515 | 516 | getEffectiveChildren() {
|
516 | 517 | let list = this.getEffectiveChildNodes();
|
|
554 | 555 | * match `selector`. These can be dom child nodes or elements distributed
|
555 | 556 | * to children that are insertion points.
|
556 | 557 | * @param {string} selector Selector to run.
|
557 |
| - * @return {Array<Node>} List of effective child nodes that match selector. |
| 558 | + * @return {!Array<!Node>} List of effective child nodes that match selector. |
558 | 559 | */
|
559 | 560 | queryAllEffectiveChildren(selector) {
|
560 | 561 | return this.queryDistributedElements(selector);
|
|
568 | 569 | *
|
569 | 570 | * @param {string=} slctr CSS selector to choose the desired
|
570 | 571 | * `<slot>`. Defaults to `content`.
|
571 |
| - * @return {Array<Node>} List of distributed nodes for the `<slot>`. |
| 572 | + * @return {!Array<!Node>} List of distributed nodes for the `<slot>`. |
572 | 573 | */
|
573 | 574 | getContentChildNodes(slctr) {
|
574 | 575 | let content = this.root.querySelector(slctr || 'slot');
|
|
586 | 587 | *
|
587 | 588 | * @param {string=} slctr CSS selector to choose the desired
|
588 | 589 | * `<content>`. Defaults to `content`.
|
589 |
| - * @return {Array<HTMLElement>} List of distributed nodes for the |
| 590 | + * @return {!Array<!HTMLElement>} List of distributed nodes for the |
590 | 591 | * `<slot>`.
|
591 | 592 | * @suppress {invalidCasts}
|
592 | 593 | */
|
593 | 594 | getContentChildren(slctr) {
|
594 |
| - let children = /** @type {Array<HTMLElement>} */(this.getContentChildNodes(slctr).filter(function(n) { |
| 595 | + let children = /** @type {!Array<!HTMLElement>} */(this.getContentChildNodes(slctr).filter(function(n) { |
595 | 596 | return (n.nodeType === Node.ELEMENT_NODE);
|
596 | 597 | }));
|
597 | 598 | return children;
|
|
649 | 650 | * }
|
650 | 651 | *
|
651 | 652 | * @param {string} jobName String to identify the debounce job.
|
652 |
| - * @param {function()} callback Function that is called (with `this` |
| 653 | + * @param {function():void} callback Function that is called (with `this` |
653 | 654 | * context) when the wait time elapses.
|
654 | 655 | * @param {number} wait Optional wait time in milliseconds (ms) after the
|
655 | 656 | * last signal that must elapse before invoking `callback`
|
|
713 | 714 | * By default (if no waitTime is specified), async callbacks are run at
|
714 | 715 | * microtask timing, which will occur before paint.
|
715 | 716 | *
|
716 |
| - * @param {Function} callback The callback function to run, bound to `this`. |
| 717 | + * @param {!Function} callback The callback function to run, bound to `this`. |
717 | 718 | * @param {number=} waitTime Time to wait before calling the
|
718 | 719 | * `callback`. If unspecified or 0, the callback will be run at microtask
|
719 | 720 | * timing (before paint).
|
|
769 | 770 | * element will contain the imported document contents.
|
770 | 771 | *
|
771 | 772 | * @param {string} href URL to document to load.
|
772 |
| - * @param {Function} onload Callback to notify when an import successfully |
| 773 | + * @param {!Function=} onload Callback to notify when an import successfully |
773 | 774 | * loaded.
|
774 |
| - * @param {Function} onerror Callback to notify when an import |
| 775 | + * @param {!Function=} onerror Callback to notify when an import |
775 | 776 | * unsuccessfully loaded.
|
776 |
| - * @param {boolean} optAsync True if the import should be loaded `async`. |
| 777 | + * @param {boolean=} optAsync True if the import should be loaded `async`. |
777 | 778 | * Defaults to `false`.
|
778 |
| - * @return {HTMLLinkElement} The link element for the URL to be loaded. |
| 779 | + * @return {!HTMLLinkElement} The link element for the URL to be loaded. |
779 | 780 | */
|
780 | 781 | importHref(href, onload, onerror, optAsync) { // eslint-disable-line no-unused-vars
|
781 | 782 | let loadFn = onload ? onload.bind(this) : null;
|
|
788 | 789 | * prefixed.
|
789 | 790 | *
|
790 | 791 | * @param {string} selector Selector to test.
|
791 |
| - * @param {Element=} node Element to test the selector against. |
| 792 | + * @param {!Element=} node Element to test the selector against. |
792 | 793 | * @return {boolean} Whether the element matches the selector.
|
793 | 794 | */
|
794 | 795 | elementMatches(selector, node) {
|
|
0 commit comments