A main goal is that objects communicating from either side of an XPCOM style interface should not generally need to know or care about the implementation language of the object on the other side of the interface. It also enables JavaScript objects to present XPCOM compliant interfaces to be called by XPCOM objects. XPConnect allows JavaScript objects to transparently access and manipulate XPCOM objects. XPConnect (Cross Platform Connect) is a technology which enables simple interoperation between XPCOM and JavaScript. The JRI technology has long since been supplanted by JNI. In addition, LiveConnect uses an earlier and now obsolete application programming interface (API) for invoking native C++ calls from Java, called JRI. Handling strings, exceptions, and other Java objects from C++ is non-obvious. Additionally, LiveConnect is tricky to program: The developer has to define a Java class for the plugin, run it through a specialized Java header compiler, and implement native methods. This prevented the browser from using other Java runtimes, and added bloat to the browser download size, since it required Java to script plugins. The disadvantage of LiveConnect is, that it is heavily tied to the version of Java embedded within the Netscape browser. The class could be called from JavaScript and from Java applets running within the page. A plugin could implement a Java class and expose an instance of it. With Netscape 4, NPAPI was extended to allow plugins to be scripted. The Java–JavaScript functionality supported by the redesigned Java Runtime Environment is still called "LiveConnect", despite the Open Java Interface-specific approach having been abandoned. However the old implementation was restored for Gecko 1.9.2, as Apple had yet to port the newer JRE over to Mac OS X. It is no longer needed with the release of a redesigned Java Runtime Environment from Sun Microsystems. The Open Java Interface-dependent implementation of LiveConnect was removed from the Mozilla source code tree in late June 2009 as part of the Mozilla 2 cleanup effort. LiveConnect was used in Netscape 4 to implement scriptability of NPAPI plugins. Conversely, from the JavaScript side, it allows a script to invoke applet methods, or to access Java runtime libraries, much as applets can. From the Java side it allows an applet to invoke the embedded scripts of a page, or to access the built-in JavaScript environment, much as scripts can. LiveConnect is a feature of Web browsers that allows Java and JavaScript software to intercommunicate within a Web page. Various versions of Netscape and then Mozilla supported this feature using different technologies, including LiveConnect, XPConnect, and NPRuntime. Scripting is a feature allowing JavaScript code in a web page to interact with the plugin. With the advent of HTML5, all major web browsers have removed support for 3rd party NPAPI plugins for security reasons. NPAPI support among major browsers started to wane since 2015 and it was gradually deprecated over the following 7 years. NPAPI was frequently used for plugins which required intensive, low-level performance such as video players, including Adobe Flash Player and Microsoft Silverlight, as well as platforms for web applications such as the Java Runtime Environment. NPAPI also supports scripting, printing, full-screen plugins, windowless plugins and content streaming. NPAPI requires each plugin to implement and expose approximately 15 functions for initializing, creating, deleting and positioning plugin content. The plugin runs in-place within the page, as opposed to older browsers that had to launch an external application to handle unknown content types. The plugin is responsible for rendering the data. When the browser encounters a content type it cannot handle natively, it loads the appropriate plugin, sets aside space within the browser context for the plugin to render and then streams data to it. In NPAPI architecture, a plugin declares content types (e.g. Initially developed for Netscape browsers, starting in 1995 with Netscape Navigator 2.0, it was subsequently adopted by other browsers. Netscape Plugin Application Programming Interface ( NPAPI) was an application programming interface (API) of the web browsers that allows plugins to be integrated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |