Google Chrome Extensions and NPAPI

前端 未结 1 524
孤街浪徒
孤街浪徒 2020-12-08 08:45

I need to write some Google Chrome extension. The problem is that Chrome JavaScript APIs don\'t give me enough power - I need to use native code. I thought about writing a N

相关标签:
1条回答
  • 2020-12-08 08:50

    If you want multi platform in one CRX, you should put them in this order within the manifest:

    "plugins": [
       { "path": "plugin-windows.dll" },
       { "path": "plugin-linux.so" },
       { "path": "plugin-mac.plugin" }
    ]
    

    Remember uploading your NPAPI extension to the store will only work in Google Chrome Extensions. In the case of Google Chrome OS (which uses Google Chrome), you will not be able to use NPAPI.

    But you should look into PPAPI which will be the recommended way doing plugin development for extension:

    http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/

    In the meantime NPAPI in extensions, you need to follow this guide (which works great):

    http://code.google.com/chrome/extensions/npapi.html

    Just remember, do you really need to use NPAPI in your extension? If you could find a HTML5 workaround, it would be better.

    0 讨论(0)
提交回复
热议问题