Files
DefinitelyTyped/dom4/dom4.d.ts
Jason Killian c00b5a1d9e Fix dom4 typings so they work with latest nightlies of TS (#8943)
The deleted members are defined in lib.d.ts's ElementTraversal interface
and thus don't need to be defined in here.
2016-04-13 00:37:30 +09:00

43 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Type definitions for dom4 v1.5
// Project: https://github.com/WebReflection/dom4
// Definitions by: Adi Dahiya <https://github.com/adidahiya>, Gilad Gray <https://github.com/giladgray>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface ParentNode {
/**
* Returns the child elements.
*/
children: HTMLCollection;
/**
* Returns the first element that is a descendant of node that matches relativeSelectors.
*/
query(relativeSelectors: string): Element;
/**
* Returns all element descendants of node that match relativeSelectors.
*/
queryAll(relativeSelectors: string): Elements;
}
interface Element extends ParentNode {
/**
* Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
*/
closest(selectors: string): Element;
/**
* Returns true if matching selectors against elements root yields element, and false otherwise.
*/
matches(selectors: string): boolean;
}
interface Elements extends ElementTraversal, ParentNode, Array<Element> {
}
interface Document extends ElementTraversal, ParentNode {
}
interface DocumentFragment extends ElementTraversal, ParentNode {
}