Class widget

Object
   |
   +--widget

class widget


The widget object

The widget objects contains properties and method which can be used to manipulate the currently running widget. The object is only available to documents which are packaged as widgets, i.e. which are loaded using a config.xml file. It is available in the global scope.

widget.setPreferenceForKey('gautamc', 'username');

Roughly, the widget object supplies functions and properties for the following features:

The following properties and methods were introduced in Opera 9.5. They are not available in 9.2x and below.

All other properties and methods have been available since 9.2x.


Defined in widget-object.js


Field Summary
 String identifier
          The unique identifier of this widget.
 Function onHide
          Function to call when the widget is hidden.
 Function onShow
          Function to call when the widget is shown after being hidden.
 String originURL
          The URL this widget was downloaded from.
 String widgetMode
          The current display of this widget.
 
Constructor Summary
widget()
            This class does not have a public constructor.
 
Method Summary
 void getAttention()
           Get the user's attention.
 void hide()
           Hide the widget.
 void openURL( <String> url )
           Open a URL in the web browser.
 String preferenceForKey(<String> key)
           Get a preference from the widget preference store.
 void setPreferenceForKey( <String> value, <String> key )
           Save a widget preference.
 void show()
           Show the previously hidden widget.
 void showNotification( <String> message, <Function> callback )
           Show a notification to the user.

Field Detail

identifier

String identifier

onHide

Function onHide

onShow

Function onShow

originURL

String originURL

widgetMode

String widgetMode

Constructor Detail

widget

widget()

Method Detail

getAttention

void getAttention()

hide

void hide()

openURL

void openURL( <String> url )

preferenceForKey

String preferenceForKey(<String> key)

setPreferenceForKey

void setPreferenceForKey( <String> value, <String> key )

show

void show()

showNotification

void showNotification( <String> message, <Function> callback )


Documentation generated by JSDoc on Mon Feb 9 15:55:06 2009