I have received quite a few feedback responses on the Add-on API Table. A curiously large percentage of the responses were from folks asking me to add support for Opera’s new extension APIs. Well I committed to updating this thing, so here you go, Opera extensions APIs are now included 😉
The Opera extension API docs were pretty tough to traverse. They are quite verbose and some sections seem like a mixture of a tutorial or article with some method references sprinkled in. I want to make sure I don’t short-change any of the browsers on the list, so please let me know if I’ve missed any APIs.
Happy extension development!
I agree on the Opera docs feeling like they’re written to be read by people already knowing what the APIs cover and how they work in a high level setting, but I had the benefit of being at AddOnCon’s Opera presentations, and think I can chip in a bit on that front:
The description of “Page Workers” (“Provides the extension with a persistent, invisible web page and access to its DOM”) sounds like the “Background Page” feature common to Chrome, Safari and Opera, albeit oddly named. All three have it fully realized, but what you link to in Firefox’s SDK docs is a much less integrated and worked through feature that might be good enough for baking your own. I’d suggest breaking out a “[every extension has a] Background Page” feature in the matrix, checking it for C/S/O but not FF, or at most do a half checkmark suggesting you might be able to hack it together on your own, with a bunch of work. When asked about if FF will be getting background pages any time soon at mentioned conference, I got a clear no, with an undercurrent of “but we like the idea, and we’d like to have it at some point”.
You can make network requests from the background page in Opera, too; example: https://addons.opera.com/addons/extensions/details/yrno-forecast/ loads data from yr.no by way of xhr.
Similarly, the background page has access to localStorage (you must access it as window.localStorage, though — for some reason you don’t get a normal-looking global scope where every property on window can be accessed directly), so check “Simple Storage”, too.
Localization is supported too (they inherit it from the W3C Widgets specs they repurposed to base their whole add-on system on).
Last note: being a huge fan of Chrome’s “page actions” feature (URL bar icons signifying functionality your add-on implements in the context of the current web page, like “I found a feed on this page; click me to […]”), I’d request breaking that one out as a separate part from “UI Widgets”. Opera does not support it yet, Chrome does, and Firefox “half” does, by not preventing you from hacking your own in a shoot-from-the-hip way Firefox usually lets you do things. 🙂
Thanks for the reply Johan, I wanted to ask you a bit more about the APIs you are indicating are present in Opera’s extension offering. I was also at Add-on Con at the Mozilla booth. I am surprised to hear someone told you we did not fully support Background Page functionality through Page Worker. The Page Worker API actually provides far more features and freedom to experiment (you can load chrome:// url pages for instance) than the other Background Page APIs in the mix 😉
The Page Worker/Background page is something I was looking for but did not find in the Opera docs. Here are the only topics I saw that discussed extension APIs:
Background Process guide
Browser Toolbar guide
config.xml resource guide
Injected Scripts guide
Windows and Tabs guide
I had thought the Background Process guide would contain a Background Page style API, but when reviewing the guide, I found it contained documentation for a widget API and a few general extension APIs that you invoke through an “extension” object. Where in that page is it talking about an API where I can bring up any page in a hidden DOM context and manipulate it?
If you can point me at the reference material for Opera’s Background Page, I will gladly tick off a few more of the APIs it makes available on the coverage table 😉