Jsplugins module

Copyright © 2005-2012 Opera Software ASA. All rights reserved. This file is part of the Opera web browser. It may not be distributed under any circumstances.

Introduction

The jsplugins module implement Native JavaScript Extensions.

Interface overview and API documentation

For detailed information on how to use the jsplugins module in Opera and the module's public API, please refer to the API documentation. The documentation needs to be generated by Doxygen.

TODO-is this correct? The visible core API consists largely of the following classes:

JS_Plugin_Manager
This class takes care of loading the extension libraries and registers the types they claim to support. It is called from the document parsing and layout code to instantiate JS_Plugin_Context objects, and handles the routing of properties to and from extensions.
JS_Plugin_Context
This object describes the extension context. There is one context per DOM environment (window) and it is used by the document parsion, layout and DOM code to connect to the extension libraries.
JS_Plugin_HTMLObjectElement_Object
This object describes a single extension instantiation. Objects of this class are used in the DOM engine to map an object to its corresponding extension library to be able to call callbacks on it.

External developer documentation

For detailed documentation for jsplugin authors, please refer to “HOWTO write an Opera Native JavaScript Extension”.

Security model

Native JavaScript Extensions have support for security models which permit restricting where they are allowed to be instantiated. More information is available in the developer documentation.

Use-cases

TODO

Supported standards

Native JavaScript Extensions is an Opera-proprietary technology, documented in the developer documentation.

Implementation and design

Design principles

Initialisation

The initialisation of the module is handled through the Opera::InitL() API.

Memory management

Stack usage

Static memory usage

During the module initialization process (called from Opera::InitL(), the module instantiates a singleton global instance of the JS_Plugin_Manager class. During initialization, the JS_Plugin_Manager reads the jsplugins.ini file to determine which plug-ins to load, and which permissions they have (see the developer documentation for more information). The lists of permissions and dynamic libraries remain in memory for the entire lifetime of Opera.

OOM policies

Performance

See also

References