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

Pass document to onDocumentReady callback #4302

Merged
merged 5 commits into from Aug 2, 2016

Conversation

jridgewell
Copy link
Contributor

I needed to feel productive today. These damn side-effect test failures are driving me crazy.

whenDocumentReady(this.win.document)
.then(() => {
// Two fold. First, resolve the promise to undefined.
// Second, causes a delay until the promise resolves so that
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a bit more explanation of why this causes a delay. It may look like a no-op to folks not very familiar with how promises work.

@aghassemi
Copy link
Contributor

LGTM

@jridgewell jridgewell merged commit 4e62d7e into ampproject:master Aug 2, 2016
@jridgewell jridgewell deleted the document-ready branch August 2, 2016 21:15
ariangibson pushed a commit to Mixpo/amphtml that referenced this pull request Sep 7, 2016
* Pass document to onDocumentReady callback

* Update performance-impl.js

* Update viewport-impl.js

* Update test-document-ready.js

* Update amp-form.js
mityaha pushed a commit to ooyala/amphtml that referenced this pull request Nov 30, 2016
* Pass document to onDocumentReady callback

* Update performance-impl.js

* Update viewport-impl.js

* Update test-document-ready.js

* Update amp-form.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants