Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

setAttributeNode method

Sets an IHTMLDOMAttribute2 interface node as part of the object.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4

 

Syntax


HRESULT retVal = object.setAttributeNode(pattr, ppretAttribute);

Parameters

pattr [in]

Type: IHTMLDOMAttribute

Pointer to the IHTMLDOMAttribute2 interface to be assigned.
ppretAttribute [out, retval]

Type: IHTMLDOMAttribute

Address of a pointer variable that receives the assigned IHTMLDOMAttribute2 pointer.

Exceptions

ExceptionCondition
WrongDocumentError
4

Raised if pattr was created from a different document than the calling element's parent document. Versions earlier than Internet Explorer 10 will throw the exception as WRONG_DOCUMENT_ERR.

NoModificationAllowedError
7

Raised if a read only attribute already exists with the same IHTMLDOMAttribute2::name as pattr. Versions earlier than Internet Explorer 10 will throw the exception as NO_MODIFICATION_ALLOWED_ERR.

InUseAttributeError
10

Raised if pattr is already assigned to an element object. Versions earlier than Internet Explorer 10 will throw the exception as INUSE_ATTRIBUTE_ERR.

 

Standards information

Remarks

IHTMLElement6::setAttributeNode was introduced in Microsoft Internet Explorer 6.

 

 

Community Additions

ADD
Show:
© 2015 Microsoft