HTC Reference
For Microsoft Internet Explorer 5 and later, HTML Components (HTCs) provide a mechanism to implement components in script as Dynamic HTML (DHTML) behaviors. An HTC is an HTML file that contains script and a set of HTC-specific elements that define the component. The component is saved with an .htc extension. This section lists these HTC-specific elements and the members they support.
Objects
documentRepresents the HTML document in a specific browser window.
elementReturns a reference to the tag in the primary document to which the behavior is attached.
PUBLIC:ATTACHBinds a function to an event, so that the function is called whenever the event fires on the specified object.
PUBLIC:COMPONENTIdentifies the content of the file as HTC.
PUBLIC:DEFAULTSSets default properties for an HTC.
PUBLIC:EVENTDefines an event of the HTC to be exposed to the containing document.
PUBLIC:METHODDefines a method of the HTC to be exposed to the containing document.
PUBLIC:PROPERTYDefines a property of the HTC to be exposed to the containing document.
Methods
createEventObjectCreates an event object that can be used to pass event context information to the PUBLIC:EVENT element's fire method.
detachEventDetaches from the event.
fireFires the event, given an event object.
fireChangeNotifies the containing document that the value of the property has changed by firing the onpropertychange event on the element.
fireEventFires the event, given a dispatch.
fireEventFires the specified event.
Events
oncontentreadyFires when the content of the element, to which the behavior is attached, has been completely parsed.
oncontentsaveFires just before the content of an element that is attached to an element behavior is saved or copied.
ondetachFires before a behavior is detached from an element.
ondocumentreadyFires when the behavior's containing document has been completely parsed.
Properties
- 4/10/2012
- Adam BP
IE9 supports, attributes added by setAttribute() method in creatElement() method.
Make changes in function useService(szService, userName, options) method of webserives.htc as follows:
//oProp=document.createElement("<PUBLIC:PROPERTY NAME="+userName+" />");
oProp = document.createElement('PUBLIC:PROPERTY');
oProp.setAttribute('NAME', userName)
- 3/5/2012
- Gupta Anshul
- 1/4/2012
- IRFANI
- 12/19/2011
- Worldlifesite
- 12/19/2011
- Worldlifesite
I am using .htc files and called it in the custom control using onload event. In IE it is properly registered and rendered but in FireFox is it not shown. What is the way to show .htc files in firefox?
- 8/18/2010
- Soundara Maran