Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IElementBehaviorFactory interface

Provides a standard mechanism for MSHTML to locate and instantiate a Dynamic HTML (DHTML) behavior.

Members

The IElementBehaviorFactory interface inherits from the IUnknown interface but does not have additional members.

Remarks

MSHTML attempts to locate and instantiate a DHTML behavior when it finds a reference to the behavior during the parsing of an HTML document.

MSHTML initially calls the host application's IServiceProvider::QueryService and specifies the SID_SElementBehaviorFactory identifier, to request the IElementBehaviorFactory interface. The hosting application provides this service through its client site.

If the IElementBehaviorFactory interface is available, MSHTML calls the IElementBehaviorFactory::FindBehavior method to instantiate the DHTML behavior. If successful, this method returns an IElementBehavior interface.

If the DHTML behavior is not available, MSHTML queries the object elements on the page to see if they implement the DHTML behavior. Position the object element serving the behavior factory before any IMPORT statements, so that when custom elements are read into the namespace, Windows Internet Explorer can find the IElementNamespaceFactory.

The component object that implements the IElementBehaviorFactory interface does not have to be safe for scripting or persistence. If an object is not safe, then Internet Explorer prompts with a warning dialog box, which provides a choice between downloading and instantiating the behavior, and canceling the operation.

Use the IObjectSafety interface to identify a DHTML behavior component object as safe for scripting. See Supporting the IObjectSafety Interface, and Signing Code with Microsoft Authenticode Technology, which provides information on how to sign component objects and mark them as safe.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.