Skip to content

ProxyRewriter

ProxyRewriter = object

One HTML rewriting pass. Every handler is synchronous: the proxy settles everything a handler needs before it builds the rewriter.

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.

string

ProxyElementHandlers

ProxyRewriter


transform(response): Response

Returns response with every registered handler applied to its HTML.

Response

Response