Package dev.gmitch215.bytebox.html
package dev.gmitch215.bytebox.html
The Workers
HTMLRewriter, with Java handlers.
HTMLRewriter.create() builds a rewriter, handlers attach
with on and the onDocument* methods, and transform wraps a
Response. The platform calls the handlers while the body is read,
each on its own fiber, so a handler may wait.
- Since:
- 1.0.3
-
InterfacesClassDescriptionAn HTML comment.Called for each comment.How inserted content is read.The document's doctype, such as
<!DOCTYPE html>.Called for the document's doctype.The end of the document, given toEndHandler.end(DocumentEnd).An element the rewriter has reached.Called for each element a selector matches.Called once at the end of the document, where content can still be appended.An element's end tag, given to a handler fromElement.onEndTag(EndTagHandler).Called when an element's end tag is reached, fromElement.onEndTag(EndTagHandler).Rewrites an HTML response as it streams, with Java handlers.A piece of text.Called for each chunk of text.