The HTMLRewriter() API gives us the ability to use jQuery-style element selectors to attach to HTML elements in raw page source to run JavaScript from that foothold.
Please visit Search Engine Land for the full article.
Original source: https://searchengineland.com/functions-core-web-vitals-tactics-with-cloudflares-htmlrewriter-331057