Object with a key of the dataset key and value of dataset value.
OptionaltagName: stringOptional tag name for the element.
CSS selector based on the specified dataset.
Dataset Object With null Value
selectDatasetEntries({ someThing: null });
// `[data-some-thing]`
Data Object with Value
selectDatasetEntries({ someThing: "stuff" });
// `[data-some-thing="stuff"]`
Data Object with Value and Tag
selectDatasetEntries({ someThing: "stuff", otherThing: "doodles" }, "a");
// `a[data-some-thing="stuff"][data-other-thing="doodles"]`
Attempts to build a CSS selector string for the specified
datasetobject. Note that the values of thedatasetobject are coerced to a string, andnullexcludes a value but only includes a key. IftagNameis specified, it is included in the resulting selector.