gingeleski / headbro

Headless browser rendering service for HTTP responses.
GNU General Public License v3.0
4 stars 0 forks source link

Allow rendering to include arbitrary JavaScript #9

Closed gingeleski closed 6 years ago

gingeleski commented 6 years ago

The POST /render endpoint should optionally take an array of JavaScript snippets to execute.

In that case, the output will include whatever comes out of those. For now we'll scope* that to the console.

*This definitely warrants a scope because firing JavaScript snippet could result in countless types of output: prompt, alert, confirm popups; something changing in the DOM; page title change; Ajax request; etc etc etc.

gingeleski commented 6 years ago

Since this description was written we've implemented #13 so output is there as needed.

gingeleski commented 6 years ago

So we're adding an optional field to POST /render named script which will just have whatever JavaScript needs executing in it.

gingeleski commented 6 years ago

Updated API doc in the wiki ahead of these changes...