You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces several DOM methods with weaker typings and closes microsoft#4689
The following changes have been made:
* All occurences of `getElementById` takes an optional type parameter for manual typing.
* All occurences of `getElementsByClassName` takes an optional type parameter for manual typing.
* `parentElement` now types to `Element` (See microsoft#4689)
getElementById<E extends Element = Element>(elementId: string): E | null;
4773
4773
/**
4774
4774
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
getElementsByName<E extends Element = Element>(elementName: string): NodeListOf<E>;
4782
4782
/**
4783
4783
* Retrieves a collection of objects based on the specified element name.
4784
4784
* @param name Specifies the name of an element.
@@ -4968,7 +4968,7 @@ interface DocumentEvent {
4968
4968
/** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
0 commit comments