quasar-framework
Version:
Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase
20 lines (16 loc) • 343 B
JavaScript
import Platform from '../plugins/platform.js'
export default (url, reject) => {
if (Platform.is.cordova && navigator && navigator.app) {
return navigator.app.loadUrl(url, {
openExternal: true
})
}
let win = window.open(url, '_blank')
if (win) {
win.focus()
return win
}
else {
reject && reject()
}
}