This documentation relates to Opera's now deprecated .oex Extension API framework for Opera versions <= 12.15 and also provided by our OEX2NEX shim library.
For the latest Opera Extensions API documentation for Opera versions > 12.15 please consult the latest Opera Extensions API documentation online.
The widget
object provides functionality for accessing an extension's metadata and persistently-stored data. It can be accessed from any of the extension's environments, such as background process, popup window, injected script or preferences page. Note that the widget
object is readonly and therefore cannot be used to edit or store values on-the-fly.
The below example shows how simple it is to access data within the widget
object.
//
// The preferences page (e.g. options.js)
//
var footer = 'This extension is the work of <a href="' + widget.authorHref + '">' + widget.author + '</a>';
document.body.innerHTML += footer;