Tag name of the Element representation of target
.
Element representation of the specified target
.
elements!InvalidElementError
if the specified target
wasn't found.
HTML (Before)
<div
id="example"
data-is-active="false"
data-count="30"
data-label="Example"
>
...
</div>
Using Attribute Name (data-*
)
const element = findElement("#example")!;
removeDatasetEntry(element, "data-label");
Using Property Name (camelCase)
const element = findElement("#example")!;
removeDatasetEntry(element, "label");
HTML (After)
<div
id="example"
data-is-active="false"
data-count="30"
>
...
</div>
Removes the dataset entry with attribute/property name
key
from thetarget
.