Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Other versions of this page are also available for the following:
.gif)
.gif)
8/28/2008
HTML Component (HTC) provides a mechanism to implement components in script as dynamic HTML (DHTML) behaviors. An HTC file, which has an .htc extension, is an HTML file that contains script and a set of HTC-specific elements that define the component.
HTC Objects
The following table shows the HTC objects that are implemented in Internet Explorer 6 for Windows Embedded CE:
| Object | Description |
|---|---|
document |
Represents the HTML document in a given browser window. |
element |
Returns a reference to the tag in the primary document to which the behavior is attached. |
PUBLIC:ATTACH |
Binds a function to an event so that the function is called when the event raises on the specified object. |
PUBLIC:COMPONENT |
Identifies the content of the file as HTC. |
PUBLIC:DEFAULTS |
Sets default properties for an HTC. |
PUBLIC:EVENT |
Defines an event of the HTC to be exposed to the containing document. |
PUBLIC:METHOD |
Defines a method of the HTC to be exposed to the containing document. |
PUBLIC:PROPERTY |
Defines a property of the HTC to be exposed to the containing document. |
HTC Events
Calling createEventObject creates an event object that can be used to pass event context information to the PUBLIC:EVENT element's raise method. The following table shows the HTC events that are implemented in Internet Explorer 6:
| Event | Description |
|---|---|
oncontentready |
Raises when the content of the element, to which the behavior is attached, is completely parsed. |
oncontentsave |
Raises exactly before the content of an element that is attached to an element behavior is saved or copied. |
ondetach |
Raises before a behavior is detached from an element. |
ondocumentready |
Raises when the behavior's containing document is completely parsed. |
For more information about how to use HTML Controls, see this Microsoft Web site.