Section 25.108. Element.setAttributeNodeNS( ): add a namespace Attr node to an Element


25.108. Element.setAttributeNodeNS( ): add a namespace Attr node to an Element

DOM Level 2 Core:

25.108.1. Synopsis

 Attr setAttributeNodeNS(Attr newAttr)     tHRows DOMException; 

25.108.1.1. Arguments

newAttr

The Attr node that represents the attribute to be added or whose value is to be modified.

25.108.1.2. Returns

The Attr node that was replaced by newAttr, or null if no attribute was replaced.

25.108.1.3. Throws

This method throws exceptions for the same reasons as setAttributeNode( ). It may also throw a DOMException with a code of NOT_SUPPORTED_ERR to signal that the method is not implemented because the current implementation does not support XML documents and namespaces.

25.108.2. Description

This method works just like setAttributeNode( ), except that it is designed for use with Attr nodes that represent attributes specified by namespace and name.

This method is useful only with XML documents that use namespaces. It may be unimplemented (i.e., throw a NOT_SUPPORTED_ERR) on browsers that do not support XML documents.

25.108.3. See Also

Attr, Document.createAttributeNS( ), Element.setAttributeNS( ), Element.setAttributeNode( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net