Make Closure compiler happier about ShadyDOM access

This commit is contained in:
Alexander Marks
2019-06-28 17:31:07 -07:00
parent 0d2c2e5dbc
commit 46ee2aecc1
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -152,7 +152,7 @@ export let FlattenedNodesObserver = class {
/** @type {!NodeList<!Node>} */ (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<!Node>} */ (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();