From 15747c832cb1ee9cf37f34e2598151d59d8e4d5d Mon Sep 17 00:00:00 2001 From: Peter Burns Date: Thu, 17 Oct 2019 23:56:22 -0700 Subject: [PATCH] Add node field to PolymerDomApi And keep DomApiNative type compatible with PolymerDomApi. Upstreaming cl/275091781 --- externs/polymer-dom-api-externs.js | 5 ++++- lib/legacy/polymer.dom.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/externs/polymer-dom-api-externs.js b/externs/polymer-dom-api-externs.js index 9b52e3394d..2076d03f89 100644 --- a/externs/polymer-dom-api-externs.js +++ b/externs/polymer-dom-api-externs.js @@ -14,7 +14,7 @@ * * @interface */ -var PolymerDomApi = function() {}; +let PolymerDomApi = function() {}; /** * @param {?Node} node @@ -103,6 +103,9 @@ PolymerDomApi.prototype.getDestinationInsertionPoints = function() {}; /** @return {?Node} */ PolymerDomApi.prototype.getOwnerRoot = function() {}; +/** @type {!Node} */ +PolymerDomApi.prototype.node; + /** * @param {string} attribute * @param {string} value diff --git a/lib/legacy/polymer.dom.js b/lib/legacy/polymer.dom.js index ff4fac8820..22b863e0e7 100644 --- a/lib/legacy/polymer.dom.js +++ b/lib/legacy/polymer.dom.js @@ -45,7 +45,7 @@ export const matchesSelector = function(node, selector) { class DomApiNative { /** - * @param {Node} node Node for which to create a Polymer.dom helper object. + * @param {!Node} node Node for which to create a Polymer.dom helper object. */ constructor(node) { if (window['ShadyDOM'] && window['ShadyDOM']['inUse']) {