diff --git a/externs/webcomponents-externs.js b/externs/webcomponents-externs.js index df0f46b8f0..99708b9e16 100644 --- a/externs/webcomponents-externs.js +++ b/externs/webcomponents-externs.js @@ -12,23 +12,37 @@ */ /* eslint-disable */ -let ShadyDOM = { +var HTMLImports = { + /** + * @param {function()} callback + */ + whenReady(callback) {}, + /** + * @param {Element} element + * @returns {Document} document + */ + importForElement(element) {} +}; + +window.HTMLImports = HTMLImports; + +var ShadyDOM = { inUse: false, - flush(){}, + flush() {}, /** * @param {!Node} target * @param {function(Array, MutationObserver)} callback * @return {MutationObserver} */ - observeChildren(target, callback){}, + observeChildren(target, callback) {}, /** * @param {MutationObserver} observer */ - unobserveChildren(observer){}, + unobserveChildren(observer) {}, /** * @param {Node} node */ - patch(node){} + patch(node) {} }; window.ShadyDOM = ShadyDOM; diff --git a/lib/legacy/legacy-data-mixin.js b/lib/legacy/legacy-data-mixin.js index 499717536b..0788e4a3c6 100644 --- a/lib/legacy/legacy-data-mixin.js +++ b/lib/legacy/legacy-data-mixin.js @@ -41,7 +41,7 @@ function wrapEffect(effect, fnName) { fn.apply(this, arguments); } catch (e) { if (e instanceof UndefinedArgumentError) { - console.warn(`Argument '${e.arg}'${fnName ?` for method '${fnName}'` : ''} was undefined. Ensure it has an undefined check.`); + console.warn(`Argument '${e.arg}'${fnName ?` for method '${fnName}'` : ''} was undefined. Ensure it has a default value, or else ensure the method handles the argument being undefined.`); } else { throw e; }