fzaninotto / screenshot-as-a-service

Website screenshot service powered by node.js and phantomjs
1.1k stars 243 forks source link

waitFor and waitTimeout : issue #39 #40

Closed tcoulter closed 7 years ago

tcoulter commented 11 years ago

Add the waitFor and waitTimeout parameters. waitFor will be evaluated periodically within the phantomjs browser; if specified, screenshot-as-a-service won't take the screenshot until waitFor evaluates to true. Example: "function() {return Config.get('loaded') == true}" -- note, you must URI encode it. waitForTimeout specifies a maximum time to wait before giving up and rendering the screenshot anyway.

I'm sure there's more I have to do, like update the readme. If you can take a look to see if it's functionally sound beforehand I'd appreciate it.