Used by the dataset
HTML attribute to represent data for custom attributes added to elements.
DOMString getDataAttr(in DOMString prop); Native code only!
|
boolean hasDataAttr(in DOMString prop); Violates the XPCOM interface guidelines
|
void removeDataAttr(in DOMString prop); Violates the XPCOM interface guidelines
|
void removeProp(in nsIAtom attr); Violates the XPCOM interface guidelines
|
void setDataAttr(in DOMString prop, in DOMString value); Native code only!
|
DOMString getDataAttr( in DOMString prop );
prop
The value for the specified property name.
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
Sets the value of the specified property.
void setDataAttr( in DOMString prop, in DOMString value );
prop
value
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | 6.0 (6.0) | ? | ? | ? |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | ? | ? | ? | ? |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DOMStringMap