开发者

What skill sets are required to write a firefox or chrome extensions? (like Adblock )

开发者 https://www.devze.com 2023-01-29 02:07 出处:网络
Does it require knowledge of C/C++ ? Going to their developers suggests they are purely based on XML/XUL/Javascript.

Does it require knowledge of C/C++ ?

Going to their developers suggests they are purely based on XML/XUL/Javascript.

Want to confirm before I decide to wr开发者_如何学编程ite one.


Chrome extensions are HTML, CSS, and JavaScript. Firefox extensions can be written with native, platform-specific C++ code, but the vast majority are XUL and JavaScript (and some XBL for the more advanced extensions).

Probably the most unusual aspect of Firefox extension code compared to web-oriented JavaScript is that Firefox uses XPCOM to organize its components internally. But it is a stretch to call familiarity with QueryInterface a "skill set."


Extensions in general (Firefox, Chrome, Safari) are all done using HTML + CSS + JS, and you can take advantage of HTML5 features which is pretty cool!

But, if you want to add C++, you can do that as well using NPAPI (Plugins). You can develop a NPAPI plugin and package it up with your extension. Remember, once you expose NPAPI, your extension will be tagged non secure because you just exposed your extension to native code. In the near future PPAPI will be a sandboxed way doing plugins.

So use HTML, JS, CSS (You can even make an abstraction layer to develop them all at once, since they are same technology, just the front end and APIs integration differs. So do not use C++ (NPAPI) unless there is absolutely no other way.

0

精彩评论

暂无评论...
验证码 换一张
取 消