======How to open a new browser window?======
Your widget might need to open a new browser window (or a popup window) for specific purposes. This would usually be done using the ''window.open'' method, but since UWA disables access to the ''window'' object, its ''open'' method is unavailable.
UWA therefore integrates a special method, called ''widget.openURL''. It only takes one parameter, the needed URL.
widget.openURL('http://www.netvibes.com');
Note that this implementation is close to the [[http://www.w3.org/TR/widgets/#the-widget0|W3C Widget specification]]'s definition of the ''openURL'' method:
you can't define the window name, nor can you specify its height, width, scrollbar...
===== Links in Apple Dashboard =====
The Dashboard uses a custom way of handling links, which means that standard ''
function link(url) {
if (widget && widget.openURL) {
widget.openURL(url);
}
}
...then using either the standard tag, or the ''span'' tag that Apple recommends.
Example
Example
Example
Example
See also the [[http://developer.apple.com/documentation/AppleApplications/Conceptual/Dashboard_ProgTopics/Articles/ExternalAccess.html#//apple_ref/doc/uid/TP40003049-DontLinkElementID_21|Dashboard documentation about widget.openURL]].