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
dataset
object. Note that the values of thedataset
object are coerced to a string andnull
excludes a value but only includes a key. IftagName
is specified, it is included in the resulting selector.