HTML Components

HTML Components (HTCs) are a legacy technology[1] used to implement components in script as Dynamic HTML (DHTML) "behaviors"[2] in the Microsoft Internet Explorer web browser. Such files typically use an .htc extension and the "text/x-component" MIME type.[3]

An HTC is typically an HTML file (with JScript / VBScript) and a set of elements that define the component. This helps to organize behavior encapsulated in script modules that can be attached to parts of a Webpage DOM.

Example

<body>
<ul>
  <li style="behavior:url(hilite.htc)">Example</li>
</ul>
</body>

In this example, the li element is given the behavior defined by "hilite.htc" (a file that contains JScript code defining highlight/lowlight actions on mouse over). The same hilite.htc can then be given to any element in the HTML page - thus encapsulating the behavior defined by this file.

gollark: I actually have a bunch of random text processing scripts like d͓̂ͤǐ̋͐à̗ͥc͎͉̉r̺̪̎ị̍̅ţ͐ͪi̺̇̊c̼̓ͣi͌ͩ̊z̨̨͟eͨ̄̉ and z⁡w⁣s⁤i‎f​y.‪
gollark: ```python#!/usr/bin/env python3import fileinputimport sysdef process_char(c): if c == "\n" or c == " ": return c return "||" + c + "||"for line in fileinput.input(): out = "".join([process_char(c) for c in line]) sys.stdout.buffer.write(out.encode("utf-8"))```
gollark: I made a simple python script for it.
gollark: https://github.com/acelewis/my_first_calculator.py
gollark: https://raw.githubusercontent.com/AceLewis/my_first_calculator.py/master/my_first_calculator.py

References


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.