HTC

HTML (DHTML)

HTC Reference

Internet Development Index

Introduced in Microsoft® Internet Explorer 5, HTML Components (HTCs) provide a mechanism to implement components in script as Dynamic HTML (DHTML) behaviors. Saved with an .htc extension, an HTC is an HTML file that contains script and a set of HTC-specific elements that define the component. This section contains a table that lists these elements and the members they support.

Objects

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 whenever the event fires 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.

Methods

createEventObject

Creates an event object that can be used when passing event context information to the PUBLIC:EVENT element's fire method.

Events

oncontentready

Fires when the content of the element, to which the behavior is attached, has been completely parsed.

oncontentsave

Fires just before the content of an element that is attached to an element behavior is saved or copied.

ondetach

Fires before a behavior is detached from an element.

ondocumentready

Fires when the behavior's containing document has been completely parsed.