From 46ee2aecc1fc5a15c5ac434d8f72b2f0b9bf7c18 Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Fri, 28 Jun 2019 17:31:07 -0700 Subject: [PATCH] Make Closure compiler happier about ShadyDOM access --- lib/mixins/element-mixin.js | 2 +- lib/utils/flattened-nodes-observer.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 07e410d088..620d20356e 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -693,7 +693,7 @@ export const ElementMixin = dedupingMixin(base => { n.shadowRoot.appendChild(dom); } if (syncInitialRender && window.ShadyDOM) { - ShadyDOM.flushInitial(n.shadowRoot); + window.ShadyDOM.flushInitial(n.shadowRoot); } return n.shadowRoot; } diff --git a/lib/utils/flattened-nodes-observer.js b/lib/utils/flattened-nodes-observer.js index ddc8b7483f..920ef9a6f7 100644 --- a/lib/utils/flattened-nodes-observer.js +++ b/lib/utils/flattened-nodes-observer.js @@ -152,7 +152,7 @@ export let FlattenedNodesObserver = class { /** @type {!NodeList} */ (wrap(this._target).children)); if (window.ShadyDOM) { this._shadyChildrenObserver = - ShadyDOM.observeChildren(this._target, (mutations) => { + window.ShadyDOM.observeChildren(this._target, (mutations) => { this._processMutations(mutations); }); } else { @@ -182,7 +182,7 @@ export let FlattenedNodesObserver = class { this._unlistenSlots( /** @type {!NodeList} */ (wrap(this._target).children)); if (window.ShadyDOM && this._shadyChildrenObserver) { - ShadyDOM.unobserveChildren(this._shadyChildrenObserver); + window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver); this._shadyChildrenObserver = null; } else if (this._nativeChildrenObserver) { this._nativeChildrenObserver.disconnect();