OptionalparentOptional parent Element, EventTarget, or CSS selector.
OptionaltagOptional element tag name to limit search.
OptionalwithKey/value pairs of attributes to search for.
OptionalwithKey/value pairs of dataset entries to search for.
OptionalwithCSS selector search string.
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.