Popup.href
Description:
A URL reference to the page to pop up; this page will pop up when the user clicks on an ExtensionUIItem; editing the href attribute while the popup is open will close the popup. Note that this attribute is set in the background script as part of the ToolbarUIItemProperties object. See the Browser Toolbar guide.
Syntax:
DOMString href
Example:
//
// The background process (e.g. '/background.js').
//
// Set options for the button
var UIItemProperties = {
disabled: false,
title: 'Opera Extension',
icon: 'images/icon_18.png',
popup: {}
};
// Set the popup's height to 480 pixels
UIItemProperties.popup.href = 'popup.html';
// Create the button and add it to the toolbar
var button = opera.contexts.toolbar.createItem(UIItemProperties);
opera.contexts.toolbar.addItem(button);About this article
| Published in | Dev.Opera |
|---|---|
| Date | December 6, 2011 |
| Author | Opera Software |
| Tags | extensions API, popup |
| Original | Internet Archive |