Ape Chef 🔪
Ape Chef 🔪
CDCloudflare Developers
Created by Ape Chef 🔪 on 10/14/2023 in #workers-help
Can't properly screenshot Page with Javascript
I have setup a a Page on CloudFlare which accepts URL params to define a background image. The page also contains a threeJS scene. When I visit the page in the browser it renders fine. However, when I use the Browser Rendering as outlined here: https://developers.cloudflare.com/browser-rendering/get-started/browser-rendering-with-do/ it takes a screenshot of the Page without the background image (inserted by JS) and the threeJS scene. I tried using the waitForFunction() and waitForElement() but it times out.I also tried setting a 10sec delay between the page being opened and it being screenshot. However this doesn't help. I am doing this: page.on('console', (message) => { console.log(Browser Console: ${message.text()}); }); --- And get this: Browser Console: THREE.WebGLRenderer: Error creating WebGL context.
1 replies