Attr

extern class js.html.Attrextends NodeAvailable in js

This type represents a DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute() , but certain functions (e.g., Element.getAttributeNode() ) or means of iterating give Attr types.

Warning: In DOM Core 1, 2 and 3, Attr inherited from Node. This is no longer the case in DOM4. In order to bring the implementation of Attr up to specification, work is underway to change it to no longer inherit from Node . You should not be using any Node properties or methods on Attr objects. Starting in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) , the ones that are going to be removed output warning messages to the console. You should revise your code accordingly. See Deprecated properties and methods for a complete list.


Documentation for this class was provided by MDN.
var isId(default,null) : BoolIndicates whether the attribute is an "ID attribute". An "ID attribute" being an attribute which value is expected to be unique across a DOM Document. In HTML DOM, "id" is the only ID attribute, but XML documents could define others. Whether or not an attribute is unique is often determined by a DTD or other schema description. var name(default,null) : StringThe attribute's name. var ownerElement(default,null) : ElementThis property has been deprecated and will be removed in the future. Since you can only get Attr objects from elements, you should already know th var specified(default,null) : BoolThis property has been deprecated and will be removed in the future; it now always returns true. var value : StringThe attribute's value. Setter throws DOMException.
version #19173, modified 2013-05-08 11:04:52 by api
0 comment