Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@types/domhandler
Advanced tools
TypeScript definitions for domhandler
npm install --save @types/domhandler
This package contains type definitions for domhandler (https://github.com/fb55/DomHandler#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler.
export interface DomHandlerOptions {
/***
* Indicates whether the whitespace in text nodes should be normalized
* (= all whitespace should be replaced with single spaces). The default value is "false".
*/
normalizeWhitespace?: boolean | undefined;
/***
* Adds DOM level 1 properties to all elements.
*/
withDomLvl1?: boolean | undefined;
/***
* Indicates whether a startIndex property will be added to nodes.
* When the parser is used in a non-streaming fashion, startIndex is an integer
* indicating the position of the start of the node in the document.
* The default value is "false".
*/
withStartIndices?: boolean | undefined;
/***
* Indicates whether a endIndex property will be added to nodes.
* When the parser is used in a non-streaming fashion, endIndex is an integer
* indicating the position of the end of the node in the document.
* The default value is "false".
*/
withEndIndices?: boolean | undefined;
}
export interface DomElement {
attribs?: { [s: string]: string } | undefined;
children?: DomElement[] | undefined;
data?: any;
name?: string | undefined;
next?: DomElement | undefined;
parent?: DomElement | undefined;
prev?: DomElement | undefined;
type?: string | undefined;
}
export interface Element extends DomElement {
name: string;
}
export interface Node extends DomElement {
readonly firstChild: DomElement;
readonly lastChild: DomElement;
readonly nodeType: number;
}
export class DomHandler {
constructor(callback: (error: any, dom: DomElement[]) => any, options?: DomHandlerOptions);
onparserinit(parser: any): void;
/***
* Resets the handler back to starting state
*/
onreset(): void;
/***
* Signals the handler that parsing is done
*/
onend(): void;
onerror(error: Error): void;
onclosetag(): void;
onopentag(name: string, attribs: { [s: string]: string }): void;
ontext(data: string): void;
oncomment(data: string): void;
oncdatastart(): void;
oncommentend(): void;
onprocessinginstruction(name: string, data: string): void;
}
These definitions were written by Johan Davidsson.
FAQs
TypeScript definitions for domhandler
The npm package @types/domhandler receives a total of 175,097 weekly downloads. As such, @types/domhandler popularity was classified as popular.
We found that @types/domhandler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.