hast-util-script-supporting
Version:
hast utility to check if a node is a script-supporting element
14 lines (13 loc) • 487 B
TypeScript
/**
* Check if a node is a script-supporting element.
*
* @param value
* Thing to check (typically `Node`).
* @returns
* Whether `value` is a script-supporting element.
*
* The elements `script` and `template` are script-supporting.
*/
export const scriptSupporting: (element: unknown, index?: number | null | undefined, parent?: import("hast").Parents | null | undefined, context?: unknown) => element is import("hast").Element & {
tagName: 'script' | 'template';
};