Property or attribute name for the dataset entry.
Optionalvalue: null | DatasetValueOptional value of the dataset entry.
OptionaltagName: stringOptional tag name for the element.
CSS selector based on the specified key and optional value.
Dataset Key without Value
selectDatasetEntry("someThing");
// `[data-some-thing]`
data- Attribute Name without Value
selectDatasetEntry("data-some-thing");
// `[data-some-thing]`
Dataset Key with Value
selectDatasetEntry("someThing", "stuff");
// `[data-some-thing="stuff"]`
data- Attribute Name with Value and Tag
selectDatasetEntry("data-some-thing", "stuff", "a");
// `a[data-some-thing="stuff"]`
Attempts to build a valid selector for a dataset with the specified
keyand optionalvalue. IftagNameis specified, it is included in the resulting selector.