JavaScript

The TV browser supports almost the full feature set of the JavaScript standard version 1.3. The implementation of JavaScript in the TV browser, known as JellyScript, is similar to the way in which the standard personal computer browser (for example, Netscape Navigator or Internet Explorer) takes advantage of the richness afforded by JavaScript. There are three generally accepted methods of incorporating JellyScript: using the HTML <SCRIPT> tag; employing an external .js file; and, using a JellyScript function as an attribute value to an HTML tag.

Note: The TV browser does not allow a document.write function within an external .js file to create a new (third) file with other script functions. This nesting effect is not supported.  Also note that use of Javascript reserved words as variable names is prohibited.

Some of the exceptions and unique behaviors follow.
 

Objects

JellyScript in the TV browser supports object handling in the same manner as defined in the JavaScript specification. Developers referencing objects with JavaScript have to pay particular attention to the window object, most specifically the window.open function. Since we do not use the concept of windowing that the PC browser is based upon, the handling of these objects can be difficult at best. While the TV browser supports it, developers are strongly encouraged never to use the window.open function.
 

Errors

When an error occurs, the TV browser terminates script execution on that page. No errors are displayed to the user. However, JavaScript alerts are supported.
 

Variables and Literals

The TV browser supports all of the standard variables and literals except unicode.
 
 

Function

The TV browser supports all of the standard functions. Taint and untaint are not supported.
 

Events

All of the standard events are supported. In the TV browser, events can only be dispatched directly to the HTML element. Event bubbling is not supported.
 

Security

Referencing a window property such as top, parent, or opener as well as the frames array always generates a cross-frame security check for multi-frame documents and documents containing IFRAMEs and EMBEDs. Security rules require that to access properties, methods, or variables in another frame, both documents must come from the same domain. We do NOT support the following features of Internet Explorer, making security on the TV browser stricter:

Internet Explorer grants write-only access to the document.location property of a document in a different domain than the current document. In Internet Explorer, a document can relax restrictions to itself by changing its document.domain property to equal what it wants. In Internet Explorer, a document can permit access to itself from a window it has opened by setting the opener property of the window to self.

Also, scripting is not allowed within e-mail.
 

Back to Top