Packages.netscape

JavaScript 1.1+ Nav3+, NES2+ Syntax

Packages.netscape.className.methodName
						

Description

The netscape sub-package of the Packages object refers to the JavaPackage containing the netscape package. This sub-package is used by Java applets to access JavaScript code via LiveConnect. The package itself has two classes: plugin and javascript.

Example

Use of this package occurs within the code of a Java applet, and not JavaScript code. However, Listing 6.202 shows an example of calling the netscape package directly to verify it is implemented in the operating browser.

Listing 6.202 Example of Accessing the netscape Package
 <html> <body> <script language="JavaScript1.1"> <!––Hide // Call the package to see if it exists if(Packages.netscape){ ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.