Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevents Closure Library (goog) and IncrementalDOM from being evaluated more than once in the same page #365

Merged
merged 2 commits into from
Mar 25, 2018

Conversation

jbalsas
Copy link
Contributor

@jbalsas jbalsas commented Mar 23, 2018

No description provided.

@jbalsas
Copy link
Contributor Author

jbalsas commented Mar 23, 2018

Tests are failing because of the web-components-polyfill, also in current branches :(

	'querySelectorAll' called on an object that does not implement interface DocumentFragment.
	D.querySelectorAll@packages/metal-web-component/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js:91:362
	querySelectorAll@packages/metal-web-component/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js:145:224
	matchFallback_@/tmp/packages/metal-dom/src/domNamed.js:441:15 <- /tmp/f31d2ff061dd32678dcd82f2224bb927.browserify:8779:14
	match@/tmp/packages/metal-dom/src/domNamed.js:429:8 <- /tmp/f31d2ff061dd32678dcd82f2224bb927.browserify:8767:9

@eduardolundgren eduardolundgren changed the title Prevents good and IncrementalDOM to throw errors and override if already present on the scope Prevents goog and IncrementalDOM to throw errors and override if already present on the scope Mar 23, 2018
@jbalsas jbalsas force-pushed the soy_bundle_dedupe branch from cc10b43 to 7df61f8 Compare March 23, 2018 23:13
@jbalsas jbalsas changed the title Prevents goog and IncrementalDOM to throw errors and override if already present on the scope Prevents Closure Library (goog) and IncrementalDOM from being evaluated more than once in the same packages Mar 23, 2018
…ed more than once in the same page

Both Closure Library (goog) and IncrementalDOM populate the global context. To prevent errors and keep both
libraries in sync, we just allow the first execution in a single page to register in the global context.
@jbalsas jbalsas force-pushed the soy_bundle_dedupe branch from 7df61f8 to 217229a Compare March 23, 2018 23:15
@jbalsas jbalsas changed the title Prevents Closure Library (goog) and IncrementalDOM from being evaluated more than once in the same packages Prevents Closure Library (goog) and IncrementalDOM from being evaluated more than once in the same page Mar 23, 2018
…lid standard signature

This was causing a problem with polyfills such as webcomponents were querySelectorAll takes
a second parameter that changes the meaning of the method and makes it fail under certain conditions
@jbalsas jbalsas force-pushed the soy_bundle_dedupe branch from 217229a to 26790e3 Compare March 24, 2018 15:12
@jbalsas jbalsas merged commit 4495b76 into develop Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant