You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files.
paramName
( optional enumerated Type array of paramType )
Undocumented.
Description of this parameter from the json schema.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
Parameters

Google Chrome Extensions (Labs)

NPAPI Plugins

NPAPI Plugins

Leveraging HTML and JavaScript makes developing new extensions really easy, but what if you have existing legacy or proprietary code that you want to reuse in your extension? You can bundle an NPAPI plugin with your extension, allowing you to call into native binary code from JavaScript.

Warning

NPAPI is a really big hammer that should only be used when no other approach will work.

Code running in an NPAPI plugin has the full permissions of the current user and is not sandboxed or shielded from malicious input by Google Chrome in any way. You should be especially cautious when processing input from untrusted sources, such as when working with content scripts or XMLHttpRequest.

Because of the additional security risks NPAPI poses to users, extensions that use it will require manual review before being accepted in the web store or extension gallery.

Details

How to develop an NPAPI plugin is outside the scope of this document. See Mozilla's NPAPI plugin reference for information on how to do that.

Once you have an NPAPI plugin, follow these steps to get your extension using it.

  1. Add a section to your extension's manifest.json that describes where to find the plugin, along with other properties about it:
    {
      "name": "My extension",
      ...
      "plugins": [
        { "path": "content_plugin.dll", "public": true },
        { "path": "extension_plugin.dll" }
      ],
      ...
    }

    The "path" property specifies the path to your plugin, relative to the manifest file. The "public" property specifies whether your plugin can be accessed by regular web pages; the default is false, meaning only your extension can load the plugin.

  2. Create an HTML file that loads your plugin by mime-type. Assuming your mime-type is "application/x-my-extension":
    <embed type="application/x-my-extension" id="pluginId">
    <script>
      var plugin = document.getElementById("pluginId");
      var result = plugin.myPluginMethod();  // call a method in your plugin
      console.log("my plugin returned: " + result);
    </script>

    This can be inside a background page or any other HTML page used by your extension. If your plugin is "public", you can even use a content script to programmatically insert your plugin into a web page.

Security considerations

Including an NPAPI plugin in your extension is dangerous because plugins have unrestricted access to the local machine. If your plugin contains a vulnerability, an attacker might be able to exploit that vulnerability to install malicious software on the user's machine. Instead, avoid including an NPAPI plugin whenever possible.

Marking your NPAPI plugin "public" increase the attack surface of your extension because the plugin is exposed directly to web content, making it easier for a malicious web site to manipulate your plugin. Instead, avoid making your NPAPI plugin public whenever possible.