Chapter 47. Scripting Java Applets and Plug-Ins
IN THIS CHAPTER
Communicating with Java applets from scripts
Accessing scripts and objects from Java applets
Controlling scriptable plug-ins
Netscape was the first to implement the facility enabling JavaScript scripts, Java applets, and plug-ins to communicate with each other under one technology umbrella, called the NPAPI (Netscape Plugin Application Programming Interface). Microsoft met the challenge and implemented a large part of that technology for WinIE4, but of course without using the Netscape-trademarked name for the technology. The name is a convenient way to refer to the capability, so you find it used throughout this chapter, applying to any browser that supports such facilities. This chapter focuses on the scripting side of the NPAPI: approaching applets and plug-ins from scripts and accessing scripts from Java applets.
Except for the part about talking to scripts from inside a Java applet, we don't assume you have any knowledge of Java programming. The primary goal here is to help you understand how to control applets and plug-ins (including ActiveX controls in WinIE) from your scripts. If you're in a position to develop specifications for applets, you learn what to ask of your Java programmers. But if you are also a Java applet programmer, you learn the necessary skills to get your applets in touch with HTML pages and scripts.
NPAPI Overview
Before you delve too deeply into the subject, you should be aware that NPAPI features ...
Get JavaScript® Bible, Seventh Edition 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.