Developing browser extensions
can be a daunting task. If you want to release a version of your
extension for each major browser in the market, you basically have to
develop a different extension for each one of them. Sometimes you'll be
able to reuse code (e.g., between Chrome and Safari extensions), and
sometimes not (e.g., between Firefox and IE extensions).
If you want to develop browser extensions the way each browser meant you to develop them, then you'll have full control over your extension at the cost of the non negligible effort it will take you to learn each extension development framework. This is what I call the Normal Way of developing a browser extension. You may read about other alternatives here.
The Normal Way
Each major browser offers a different programming framework for developing extensions.- In Internet Explorer (5 or later) browser extensions are written in C# or C++. More specifically, it is possible to create up to three different kinds of toolbars (custom explorer bars, tool bands and desk bands) and to combine them with browser helper objects in order to provide added functionality.
- In Firefox extensions can be created as add-ons that occasionally contribute to the GUI by extending the browser with XUL. The logic behind the extension is written in JavaScript running under expanded privileges. Mozilla Jetpack can be used to simplify the development of add-ons for Firefox.
- In Safari (5 or later) browser extensions may add bars and buttons to the GUI. The logic behind the extension is written in JavaScript with access to a special JavaScript API to interact with the Safari application and web content.
- In Google Chrome (4 or later) browser extensions may add browser actions to the browser window. The logic behind the extension is written in JavaScript with access to a special JavaScript API to interact with the Chrome application and web content. The privileges under which a Chrome extension runs are governed by a set of permissions.
- In Opera (11 or later) browser extensions may add buttons to the browser window. The logic behind the extension is written in JavaScript with access to a special JavaScript API to interact with the Opera application and web content.
In Firefox, Chrome, Safari and Opera toolbar styling is done though CSS.
No comments:
Post a Comment