getInnerContent on html-rewriter

Perhaps this is an elementary question. I am using the html rewriter, and I need to modify the inner content of a particular element. I can access the element, and of course I can call setInnerContent to replace the content completely, but what I need to do actually is to take the existing inner content, modify it, and call setInnerContent with that result.

There does not seem to be a getInnerContent method though. Is it possible with html rewriter to access the actually inner content? I of course have reviewed the documentation but it doesn’t answer the question. Do I need to do use the Document Handler instead?

Is this question related to Cloudflare Workers?

It is yes, my apologies if I mis-filed it,