JellyScript (Definition)

The JavaScript interpreter inside a WebTV set-top box is referred to as JellyScript.

This interpreter is based on the normal web browser JavaScript with a few limitations and some additional functionality. The interpreter functionality is mainly limited due to the small amount of memory available in the set-top box. Low memory is imprtant to keep the manufacturing costs as small as possible.

The JellyScript interpreter underwent an upgrade in late Spring 2000 and was released for public use during the Summer. It is generally referred to as the Summer 2000 release.

Versions prior to Summer 2000 did not care about case-sensitivity of built-in property and method names. This was also the case with MSIE 3.0

The summer 2000 version introduces support for user-defined properties and such like. This means that DHTML effects created by authoring tools such as DreamWeaver should work better in WebTV boxes that are shipped after this date or are upgraded in the field.

Event handling support is improved in the latest release. Earlier versions had problems with event handlers that had not yet completed their execution after 10 seconds. The WebTV documentation still suggests that the Window.onunload event handler is not used.

The javascript: URL format can be used with the minor limitation that it cannot be typed manually by the user.

Anonymous functions are properly supported by the WebTV set-top box from the Summer 2000 release onwards. Earlier versions of this product only partially supported anonymous functions.

Referring to page element objects by their names is more flexible. Versions of WebTV prior to the Summer 2000 release required that the references were fully qualified. THis is still recommended but the JellyScript interpreter is now more forgiving, along the lines of the JScript interpreter in the MSIE browser. Some care still needs to be taken when building web pages for use in cross browser situations.

Security was enhanced in the Summer 2000 release. This is now correctly implemented inline with the rules of access to window content from different domains.

Thw screen property was added to the Window object and contains a reference to the Screen object that describes the size and attributes of the TV display screen.

The method will behave differently in JellyScript when compared with the behaviour in a normal computer-based web browser. It creates a pseudo window in an IFRAME and appends it to the end of the current display. The user can then scroll down to this window. On the whole this behaviour is so different to the normal usage that it is probably best to avoid using it.

The Summer 2000 release of JellyScript now supports full double-precision math routines. Date object support is now up to ECMA standard specifications with full support for all oproperties and methods. The identity (===) and non identity (!==) operators are also now supported (consistent with the support in the MSIE browser).

There are some areas of functionality that are considered weak or are completely unsupported on this platform:

Be careful when accessing form elements within a document. In fact you should generally fully qualify all references to objects within the page. This is mandatory with form elements, which should have the document object referred to as the first item in the hierarchy chain that describes the element's location in the DOM.

You should also be careful when testing for browers types in the user agent string. Eliminate the possibility of the browser being a WebTV box before testing for the Netscape browser. If you don't, then it is likely you will test true for being a Netscape browser even when executing the JavaScript code on a WebTV box. You will need to scan the entire user agent string. To parse out the string "WebTV" it might be worth converting to lowercase first to increase your chances of a match.

See also:TV Set-top boxes, WebTV


This link leads to a useful WebTV JavaScript guide, for interested parties.