Scriptlet (Definition)

A scripting component within the Windows Script Host environment.

Scriptlets are built in the WSH environment or in the web browser. They have evolved over time and become useful for a variety of purposes.

Those items that used to be called scriptlets in the MSIE browser have evolved into what is now called HTML components or HTCs for short.

The original kind of scriptlet (nowadays called a version 1 scriptlet) should now be referred to as a DHTML scriptlet. It is used to construct an HTML object with XML and JavaScript.

A version 2 scriptlet is compiled from its XML and JavaScript source into an ActiveX object which can be used in contexts other than web pages.

Standalone JavaScript scripts that run in WSH are not scriptlets but are simply scripts.

Scriptlets can be built in a variety of ways. Although we are mainly concerned with JavaScript, you can use Perl or VBScript, too. They all use a similar XML framework.

See also:.htc, HTML Component

Cross-references:

Wrox Instant JavaScript - page - 284

Wrox Professional JavaScript - page - 776

Web-references:

news://msnews.microsoft.com/public.scripting.scriptlets

http://msdn.microsoft.com/scripting

http://msdn.microsoft.com/workshop/languages/clinic/xmlscript.asp

http://wsh.glazier.co.nz/