0
Vaadin有没有支持html5浏览器的桌面通知?我一直在寻找这个,并找不到任何具体的东西。Vaadin桌面通知
我试过这样没有运气的东西。
JavaScript.getCurrent().execute(
"if (window.webkitNotifications) {" +
"if (window.webkitNotifications.checkPermission() == 0) { // 0 is PERMISSION_ALLOWED" +
" window.webkitNotifications.createNotification(" +
" 'icon.png', 'Notification Title', 'Notification content...');" +
" } else {\n" +
" window.webkitNotifications.requestPermission();" +
" } " +
"} else { " +
" console.log('no notifications')" +
"}");
使用vaadin 8