Skip to content

Commit

Permalink
Merge pull request #5355 from Polymer/getFlattenedNodes
Browse files Browse the repository at this point in the history
Add cast for compilation
  • Loading branch information
rictic authored Sep 13, 2018
2 parents 2a49743 + 29428a8 commit b3713cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/legacy/polymer.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export class DomApi {
* Returns an instance of `FlattenedNodesObserver` that
* listens for node changes on this element.
*
* @param {function(this:Element, { target: !Element, addedNodes: !Array<!Element>, removedNodes: !Array<!Element> }):void} callback Called when direct or distributed children
* @param {function(this:HTMLElement, { target: !HTMLElement, addedNodes: !Array<!Element>, removedNodes: !Array<!Element> }):void} callback Called when direct or distributed children
* of this element changes
* @return {!FlattenedNodesObserver} Observer instance
*/
observeNodes(callback) {
return new FlattenedNodesObserver(
/** @type {!Element} */(this.node), callback);
/** @type {!HTMLElement} */(this.node), callback);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/utils/flattened-nodes-observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export class FlattenedNodesObserver {
}

/**
* @param {!Element} target Node on which to listen for changes.
* @param {?function(this: Element, { target: !Element, addedNodes: !Array<!Element>, removedNodes: !Array<!Element> }):void} callback Function called when there are additions
* @param {!HTMLElement} target Node on which to listen for changes.
* @param {?function(this: Element, { target: !HTMLElement, addedNodes: !Array<!Element>, removedNodes: !Array<!Element> }):void} callback Function called when there are additions
* or removals from the target's list of flattened nodes.
*/
constructor(target, callback) {
Expand All @@ -113,7 +113,7 @@ export class FlattenedNodesObserver {
this._nativeChildrenObserver = null;
this._connected = false;
/**
* @type {!Element}
* @type {!HTMLElement}
* @private
*/
this._target = target;
Expand Down

0 comments on commit b3713cf

Please sign in to comment.