UNPKG

htmlrewriter

Version:

Use Cloudflare HTMLRewriter in Node.js, Browser, Next.js and more

13 lines (12 loc) 534 B
import { DocumentHandlers, ElementHandlers } from './types'; declare class HTMLRewriter { static initPromise?: Promise<void>; constructor(options?: any); elementHandlers: [selector: string, handlers: ElementHandlers][]; documentHandlers: DocumentHandlers[]; on(selector: string, handlers: ElementHandlers): this; onDocument(handlers: DocumentHandlers): this; transform(response: Response): Response; } export declare function HTMLRewriterWrapper(initPromise: Promise<any>): typeof HTMLRewriter; export {};