Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jsx_stream/mod.ts>TagHooks

JSX runtime for server-side only async streaming
Latest
interface TagHooks
import { type TagHooks } from "https://deno.land/x/jsx_stream@v0.2.0/mod.ts";

Properties

optional
beforeStart: (openTag: Tag, context: Context) => Node | void
optional
afterStart: (openTag: Tag, context: Context) => Node | void
optional
beforeEnd: (
openTag: Tag,
context: Context,
tokens?: Token[],
) => Node | void
optional
afterEnd: (
openTag: Tag,
context: Context,
tokens?: Token[],
) => Node | void
optional
collectTokens: boolean

Declare that all tokens within an element (including the element tags themselves) should be collected and passed into the beforeEnd/afterEnd hook.