UNPKG

quasar-framework

Version:

Simultaneously build desktop/mobile SPA websites & phone/tablet apps with VueJS

26 lines (21 loc) 473 B
import Platform from '../platform' import Dialog from '../components/dialog/dialog' /* istanbul ignore next */ export default (url) => { if (Platform.is.cordova) { navigator.app.loadUrl(url, { openExternal: true }) return } let win = window.open(url, '_blank') if (win) { win.focus() } else { Dialog.create({ title: 'Cannot Open Window', message: 'Please allow popups first, then please try again.' }).show() } }