--- title: DOMStringMap slug: Web/API/DOMStringMap translation_of: Web/API/DOMStringMap ---
{{ APIRef("HTML DOM") }}
Usado pelo atributo HTML {{ htmlattrxref("dataset") }} para representar atributos próprios adicionados ao elemento.
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
se a propriedade existir ou false
se não existir.
void removeDataAttr( in DOMString prop );
prop
Remove a propriedade do dataset do objeto. Usada para atualizar o objeto de dataset do objeto quando o atributo data-* houver sido removido do elemento.
void removeProp( in nsIAtom attr );
attr
{{ CompatibilityTable() }}
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Suporte básico | {{ CompatUnknown() }} | {{CompatVersionUnknown}} | {{ CompatGeckoDesktop("6.0") }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suporte básico | {{ CompatUnknown() }} | {{CompatVersionUnknown}} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |