--- title: DOMStringMap slug: Web/API/DOMStringMap tags: - API translation_of: Web/API/DOMStringMap ---
{{ APIRef("HTML DOM") }}
Used by the {{ htmlattrxref("dataset") }} HTML attribute to represent data for custom attributes added to elements.
DOMString getDataAttr(in DOMString prop); |
boolean hasDataAttr(in DOMString prop); |
void removeDataAttr(in DOMString prop); |
void removeProp(in nsIAtom attr); |
void setDataAttr(in DOMString prop, in DOMString value); |
boolean hasDataAttr( in DOMString prop );
prop
true
if the property exists; otherwise false
.
void removeDataAttr( in DOMString prop );
prop
Removes the property from the dataset object. Used to update the dataset object when data-* attribute has been removed from the element.
void removeProp( in nsIAtom attr );
attr
{{Compat("api.DOMStringMap")}}