JSDOM in cloudflare worker?


I would like to use the Cloudflare worker to get information from a single page application. I need the application to render javascript before can get this information.

Has anyone successfully managed to use a headless browser such as JSDOM in a cloudflare worker?
Is this something thats even possible at this time? Are there any examples out there?


Parsing the DOM require too much CPU time.

See the benchmarks, they go over the 5ms of the free plan - you’d have to use a larger plan that gives you 20ms to be able to do this.


Oh wow…Thanks for bringing that up. It appears that cloudflare worker will not work for my use case.


Afaik, there is no complete DOM replacement, but you may try my adopted version of node-trumpet: