Skip to content

Commit

Permalink
Merge pull request #537 from Polymer/wc-ready-check
Browse files Browse the repository at this point in the history
Better check for whether to listen for `WebComponentsReady` event
  • Loading branch information
Steve Orvell authored Apr 24, 2017
2 parents ad59963 + f533c18 commit 2877765
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion browser.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion browser/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function whenFrameworksReady(callback) {
};

// If webcomponents script is in the document, wait for WebComponentsReady.
if (document.querySelector('script[src*="webcomponents"]')) {
if (window.WebComponents && !window.WebComponents.ready) {
debug('WebComponentsReady?');
window.addEventListener('WebComponentsReady', function wcReady() {
window.removeEventListener('WebComponentsReady', wcReady);
Expand Down

0 comments on commit 2877765

Please sign in to comment.