html-rewriter

Module@fastly/js-compute 4.0.0

html-rewriter

Classes

ElementRepresents an HTML element encountered during rewriting. Passed to the callback registered via HTMLRewritingStream.onElement.
HTMLRewritingStreamLets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback, which can manipulate the element's attributes and add or remove content from the immediate context.

Interfaces

ElementRewriterOptionsOptions for content insertion and replacement methods on Element.