HRESULT getNamedItem( BSTR bstrName, IHTMLDOMAttribute **newretNode );
- [in] A BSTR that specifies the name of the IHTMLDOMAttribute to get.
- [out, retval] The address of a pointer to a IHTMLDOMAttribute with the specified name.
Returns S_OK if successful, or an error value otherwise.
If the IHTMLDOMAttribute applies to an element but is not specified, this method returns the IHTMLDOMAttribute with the specified name set to an empty string.
If the IHTMLDOMAttribute does not apply to the element and is not specified, then an error is returned.
If the IHTMLDOMAttribute does not apply to the element and is specified, then the IHTMLDOMAttribute with the specified name is returned.
Windows Internet Explorer 8 and later. In IE8 Standards mode, the IHTMLAttributeCollection2::getNamedItem method does not create IHTMLDOMConstructorCollection::Attr objects that do not exist in the collection; it returns NULL when an IHTMLDOMAttribute is not found. For more information on IE8 mode, see Defining Document Compatibility.
IHTMLAttributeCollection2::getNamedItem was introduced in Microsoft Internet Explorer 6.