Specifies additional COM interface handlers for a script component.
<implements type="COMHandlerName" [id="internalName"] [default=fAssumed]> handler-specific information here </implements>
Interface handler | Description | How implemented |
---|---|---|
ASP | Allows a script component to get access to the Microsoft Internet Information Services (IIS) Active Server Pages (ASP) object model. | Built into Scrobj.dll |
DHTML Behaviors | Allows a behavior script component to communicate with the containing page so it can fire events and access the DHTML object model. | Built into Scrobj.dll |
<implements type="Behavior" id="sctBehavior"> [...] </implements> [...] <script language="JScript"> // [...] sctBehavior.fireEvent("onResultChange",oEvent); </script>
Interface handlers extend the script component run-time. An interface handler is a compiled component (generally written in C++) that implements specific COM interfaces.
Script components by default implement the COM Automation interface (specifically, the IDispatchEx COM interface). The Automation object's properties, methods, and events are defined in the script component's <public> element. Because the Automation handler is implemented by default, you do not need to implement it with the <implements> element.
Script components can also implement additional COM interfaces by including an <implements> element. Inside the <implements> element, you specify information specific to the interfaces you are implementing. Each interface handler requires different information. For example, a Behavior script component can include <attach> and <layout> elements that are specific to the DHTML Behavior interface.
<implements type="Behavior"> <event name="onResultChange" /> </implements>