Availability
DOM Level 2 Core
Synopsis
Attr setAttributeNodeNS(Attr newAttr)
throws DOMException;
Arguments
newAttr
The Attr node that represents the attribute to be added or whose
value is to be modified.
Returns
The Attr node that was replaced by
newAttr, or null if no
attribute was replaced.
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.
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.
See Also
Attr, Element.setAttributeNS( ), Element.setAttributeNode( )
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.