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

1.3.1 Element Behaviors and HTML Components

Note.  Data-binding and behaviors are not supported in IE11 Mode.

Element behaviors allow a developer to define custom elements that can be used in the same way as normal HTML elements in a webpage. Because element behaviors are encapsulated components, they can add functionality to a webpage while improving the reusability and organization of content, script, and style elements.

Element behaviors are synchronously attached to elements through special style sheet rules, or an IMPORT processing instruction such as the following:

<HTML xmlns:games>
<HEAD>
<?IMPORT namespace="games" implementation="checkers.htc" ?>
</HEAD>
<BODY>
<games:checkers />
</BODY>
</HTML>

Element behaviors, which are used to define custom elements, are also called HTML Components (HTC). The implementation of the HTC is encapsulated in an .htc file.

The following elements and attributes are used to define the public interface and event model of an HTC:

For more information about Element Behaviors and HTC, see Introduction to DHTML Behaviors [MSDN-DHTMLBehaviors].

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.