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

🐛A4A: Change a few window refs to ampdoc #25321

Merged
merged 1 commit into from
Oct 31, 2019
Merged

🐛A4A: Change a few window refs to ampdoc #25321

merged 1 commit into from
Oct 31, 2019

Conversation

calebcordry
Copy link
Member

Using globals can be risky and may break assumptions in shadow mode.

Fixes #25007

@@ -564,7 +564,7 @@ function createBaseCustomElementClass(win) {
// If we do early preconnects we delay them a bit. This is kind of
// an unfortunate trade off, but it seems faster, because the DOM
// operations themselves are not free and might delay
startupChunk(self.document, () => {
startupChunk(this.getAmpDoc(), () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, at least @dvoytenko says so :)

@calebcordry calebcordry merged commit 3640f2c into ampproject:master Oct 31, 2019
@calebcordry calebcordry deleted the shadow-a4a-fix branch October 31, 2019 03:43
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doubleclick served a4a ads do not work when loaded in a PWA with shadowdom
4 participants