How we can add HTML page in workers and use its element in in index.js file.
I wanted to create an Image element and use that in index.js file.
May I ask if you’re wanting to show a HTML webpage using Worker as an inline script with defining a constant, or rather some kind of an “upload” your index and use it like that, or rather fetch some index from a different URL?
How did you approached to create your Worker?
Regarding the topic title, did you used Wrangler CLI or Cloudflare dashboard to write the code?
Regarding the img
HTML element, you want to show it after the webpage is being loaded, or modify something you’re already having?
I used the Wrangler CLI to write the code.
I am trying to run object detection functionality on Worker’s server. For that either I wanted to upload an Image or use the image already there in my source folder. In both the cases I want to have img HTML element which I want to use in index.js.
Is there any way to return the full html (not the response from some url) from handle request and then I can call my javascript function in that html