Element representation of target.
CSS selector string to find the element.
Optionalparent: null | ElementLikeOptional Element or EventTarget for parent.
Element of type E if found, otherwise null.
SyntaxError if the specified selector is invalid.
Query the DOM to find the element using one of the specified options in the
optionally specified parent.
Element representation of target.
Options for finding the element.
Use to specify search criteria for finding element(s). You can find elements by selector, dataset entries, or attributes.
To search for the existence of an attribute or dataset property (not the
value), set the value to null.
Optionalparent?: Target | nullOptional parent Element, EventTarget, or CSS selector.
OptionaltagName?: TagName | stringOptional element tag name to limit search.
OptionalwithAttributes?: Attributes<E> | AttributeName[] | AttributeNameKey/value pairs of attributes to search for.
OptionalwithDataset?: Dataset | DatasetKey[] | DatasetKeyKey/value pairs of dataset entries to search for.
OptionalwithSelector?: CssSelectorCSS selector search string.
Element of type E if found, otherwise null.
SyntaxError if withSelector in the specified options is invalid.
TypeError if the specified options are invalid.
Query the DOM for an element matching the specified CSS
selectorin the optionally specifiedparent.