Using navigator.notification.confirm instead of JS confirm popup.
Using navigator.notification.alert instead of JS alert popup.