Skip to content

ProxyElement

ProxyElement = object

An HTML element, as a ProxyRewriter handler receives it. The proxy calls only these three methods, so an adapter needs nothing more.

append(content, options?): void

Inserts content just before the element’s end tag: as raw HTML when html is true, as text otherwise. The proxy escapes HTML content before it calls this, so pass it through unchanged.

string

boolean

void


getAttribute(name): string | null

The attribute’s value, or null when the element does not have it.

string

string | null


remove(): void

Removes the element and everything inside it.

void