Socket
Socket
Sign inDemoInstall

@types/dom4

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/dom4

TypeScript definitions for dom4


Version published
Weekly downloads
119K
decreased by-3.18%
Maintainers
1
Install size
5.95 kB
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/dom4

Summary

This package contains type definitions for dom4 (https://github.com/WebReflection/dom4).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom4.

index.d.ts

/**
 * https://dom.spec.whatwg.org/#parentnode
 */
interface ParentNode {
    /**
     * Returns the child elements.
     */
    readonly children: HTMLCollection;

    /**
     * Inserts `nodes` after the last child of this node, while replacing strings with equivalent `Text` nodes.
     */
    append(...nodes: Array<Node | string>): void;

    /**
     * Inserts `nodes` before the first child of this node, while replacing strings with equivalent `Text` nodes.
     */
    prepend(...nodes: Array<Node | string>): void;
}

/**
 * https://dom.spec.whatwg.org/#childnode
 */
interface ChildNode {
    /**
     * Inserts `nodes` just after this node, while replacing strings with equivalent `Text` nodes.
     */
    after(...nodes: Array<Node | string>): void;

    /**
     * Inserts `nodes` just before this node, while replacing strings with equivalent `Text` nodes.
     */
    before(...nodes: Array<Node | string>): void;

    /**
     * Replaces this node with `nodes`, while replacing strings in nodes with equivalent Text nodes.
     */
    replaceWith(...nodes: Array<Node | string>): void;

    /**
     * Removes this node.
     */
    remove(): void;
}

interface Element extends ParentNode {
    /**
     * Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
     */
    closest(selectors: string): Element | null;

    /**
     * Returns true if matching selectors against element’s root yields element, and false otherwise.
     */
    matches(selectors: string): boolean;
}

interface Elements extends ParentNode, Array<Element> {
}

interface Document extends ParentNode {
}

interface DocumentFragment extends ParentNode {
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Adi Dahiya, and Gilad Gray.

FAQs

Last updated on 07 Nov 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc