Function processHTML
- processHTML(
opts: {
containerElement?: string;
firstMatchOnly?: boolean;
html: string;
namespaceURI?: string;
process: (HTMLElement: any) => void;
selector: string;
},
): string Parameters
- opts: {
containerElement?: string;
firstMatchOnly?: boolean;
html: string;
namespaceURI?: string;
process: (HTMLElement: any) => void;
selector: string;
}Options
Optional
containerElement?: stringUse a specific container element.
Optional
firstMatchOnly?: booleanWhen true
querySelector
is invoked to process the first matching element only.html: string
The HTML to process.
Optional
namespaceURI?: stringThe namespace URI of the elements to select.
process: (HTMLElement: any) => void
The selected element processing function.
selector: string
The CSS selector query.
Returns string
The processed HTML.
- opts: {
Processes the given HTML by creating by running a CSS selector query with all matched elements being passed through the provided
process
function.