Notify method
Notifies the Dynamic HTML (DHTML) behavior about the progress of parsing the document and the element to which the behavior is attached.
Syntax
HRESULT retVal = object.Notify(lEvent, pVar);
Parameters
lEvent [in]
Type: LONG
A value of type LONG that specifies one of the following notification types.
BEHAVIOREVENT_CONTENTREADY
Received when the end tag of the element to which this Dynamic HTML (DHTML) behavior is attached is parsed. This notification indicates that the element can be accessed through a call to IElementBehaviorSite::GetElement.
BEHAVIOREVENT_CONTENTSAVE
Received when the content of the behavior is saved.
BEHAVIOREVENT_DOCUMENTREADY
Received when the entire document to which this Dynamic HTML (DHTML) behavior is attached is parsed. This notification is different from the HTMLFrameSiteEvents::onload event or IHTMLElement2::readyState property, both of which indicate that the entire document and associated content, such as images, have downloaded.
BEHAVIOREVENT_ONDOCUMENTCONTEXTCHANGE
Received when a behavior is added to or removed from a document. However, when a behavior is created in a document by way of the parser, there is no document context change notification.
BEHAVIOREVENT_APPLYSTYLE
Not currently used.
pVar [in, out]
Type: VARIANT
Reserved. Must be set to NULL.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The oncontentready event and the ondocumentready event are used to add code that implements the following.
- Adding to, modifying, or referencing the Document Object Model (DOM) in the primary document.
- Creating a viewlink.