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

Workaround to include lazy loading #118

Open
phoebebright opened this issue Jan 8, 2016 · 1 comment
Open

Workaround to include lazy loading #118

phoebebright opened this issue Jan 8, 2016 · 1 comment

Comments

@phoebebright
Copy link

My site does a lot of rendering via javascript, calling APIs, creating charts etc.
As a lazy approach, would it be possible to include a delay argument to give the page time to render?
Even better would to specify a dom element to look for and delay until that element is available.

Phoebe.

@cburgmer
Copy link
Owner

cburgmer commented Jan 9, 2016

Hey, I think you are describing a valid use case.

A few things:

  • There is already an option to change the timeout after the page rendering is interrupted for the screenshot. See executeJsTimeout under Optional parameters.
  • With regards to lazy loading: There is a lot of work happening internally for the rendering. First all resources are loaded via AJAX, and injected in the page. Finally the page is rendered in an iframe triggering the JavaScript to execute. At this stage you will not be able to lazy load any resources via AJAX without workarounds. (There is an issue Support dynamically loaded images #73 for this.)
  • "specify a dom element to look for" sounds like a good feature to have, when the content is known. Currently we are limited to having the timeout in milliseconds.

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

No branches or pull requests

2 participants