ProxyRewriter
ProxyRewriter =
object
One HTML rewriting pass. Every handler is synchronous: the proxy settles everything a handler needs before it builds the rewriter.
Methods
Section titled “Methods”on(
selector,handlers):ProxyRewriter
Registers handlers for elements matching the CSS selector and returns
this rewriter, so calls chain. Throw on a selector the platform cannot
parse. The proxy tests the body selector this way: on a throw it warns
config_invalid and serves overlay instead of truncated.
Parameters
Section titled “Parameters”selector
Section titled “selector”string
handlers
Section titled “handlers”Returns
Section titled “Returns”ProxyRewriter
transform()
Section titled “transform()”transform(
response):Response
Returns response with every registered handler applied to its HTML.
Parameters
Section titled “Parameters”response
Section titled “response”Response
Returns
Section titled “Returns”Response