Skip to content

Commit

Permalink
Merge pull request #5348 from Polymer/sync-externs
Browse files Browse the repository at this point in the history
Upstream changes to externs
  • Loading branch information
kevinpschaaf authored Feb 5, 2019
2 parents 77ac3ec + 19dd467 commit 6611abe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
24 changes: 19 additions & 5 deletions externs/webcomponents-externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<MutationRecord>, 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;
Expand Down
2 changes: 1 addition & 1 deletion lib/legacy/legacy-data-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6611abe

Please sign in to comment.