-
Notifications
You must be signed in to change notification settings - Fork 14
openExternalUrl
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 !
url is the URL of the page you want to load in the browser.
example
cobalt.openExternalUrl("http://cobaltians.com")
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 !
This is the message to sent to native to show a toast.
{
type: "intent",
action: "openExternalUrl",
data: {
url: "http://www.cobaltians.com"
}
}
Cobalt is an Open-Source Hybrid Mobile Framework. Read more about it on the home page or in the documentation
- Introduction to Cobalt navigation
- The cobalt.json file
- native navigation bars
- Handling the Android back button
- Introduction to Cobalt messages
- Publish/Subscribe on the Web side
- Publish/Subscribe on Android
- Publish/Subscribe on iOS
- Web Lifecycle messages
- Pull-To-Refresh and Infinite Scroll
- Custom alerts and Toasts
- LocalStorage
- OpenExternalUrl
- PlatformInfos
- Ajax
- Removing the top bar
- Adding Cobalt to an existing project
- Customizing your hybrid views
- Handle multiple Cobalt webviews on the same screen (TODO)