Skip to content
cobaltians edited this page Jun 13, 2014 · 8 revisions

OpenExternal Url allows you to open an url into the device browser, instead of the current page.

For the moment, cobalt doesn't automatically open links with target=_blank because we think you may want to open them in the app. If you disagree, please create a discussion on the bug tracker !

cobalt.openExternalUrl(url)

url is the URL of the page you want to load in the browser.

example

cobalt.openExternalUrl("http://cobaltians.com")

Not available on Tizen and Blackberry

On Tizen and BlackBerry10, we didn't take the time to code this. You can still catch the message sent by the web yourself (see "Under the hood" section for message JSON).

If you decide to code it, we would be glad to add it to the core of Cobalt and will send you lots of love !

Under the hood

This is the message to sent to native to show a toast.

{
    type: "intent",
    action: "openExternalUrl",
    data: {
        url: "http://www.cobaltians.com"
    }
}
Clone this wiki locally