Questions tagged [html5-notifications]

This W3C specification defines an API to let a web page send a notification to the user on the desktop or mobile device.

The W3C Web Notifications API allows JavaScript to display a notification outside the context of the page.

This is currently supported on Chrome, Firefox, OS X Safari, Opera, Blackberry Browser 10, Firefox for Android.

45 questions
37
votes
2 answers

Failed to construct Notification: Illegal constructor

My site uses desktop notifications which have never worked on mobile devices but I've recently started to receive the following exception in Chrome Version 42.0.2311.108 on Android 4.4: Failed to construct 'Notification': Illegal constructor. Use…
SignalRichard
  • 1,572
  • 2
  • 17
  • 32
28
votes
1 answer

HTML5 Notification With PHP

I noticed Facebook started using the HTML5 notification for desktop and I thought I would start dabbling in it for fun for my blog. My idea is pretty simple: new blog comes out, apache cronjob runs every X minutes and calls a file, does some PHP…
Kenton de Jong
  • 1,001
  • 4
  • 17
  • 37
26
votes
2 answers

Webkit notifications requestPermission function doesn't work

I am trying to implement support for WebKit's native desktop notifications on my site. When I try to ask for user's permission to use the notifications, absolutely nothing happens. For example, the following HTML does not prompt Chrome to ask me for…
Alexey Blinov
  • 1,684
  • 3
  • 17
  • 25
19
votes
5 answers

Gecko/Firefox support for HTML5 Notifications

I'm wondering if there is any build-in support for the HTML5 Notification feature in Gecko browsers so far? Maybe some hidden developer thingy ? I'm aware of WebKits window.webkitNotifications which works great, so, is there a Firefox implementation…
jAndy
  • 231,737
  • 57
  • 305
  • 359
16
votes
2 answers

How does Facebook send notifications without tab

Go to facebook and allow HTML5 Desktop Notification for it. Close facebook tab. Ask somebody to write you message on facebook. Now u see the notification from facebook while facebook site isn't open. HOW?
Ximik
  • 2,435
  • 3
  • 27
  • 53
14
votes
2 answers

Webkit Notifications on Multiple Tabs

I am using WebKit Notifications for my app. Say if I am using this code: var n = window.webkitNotifications.createNotification( 'icon.png', 'New Comment', 'Praveen commented on your post!' ); n.onclick = function(x) { window.focus();…
13
votes
2 answers

Remove HTML5 notification permissions

You can prompt a user to allow or deny desktop notifications from the browser by running: Notification.requestPermission(callback); But is it possible to remove that permission by code? We want our users to have the option to toggle notifications.…
Hans Westman
  • 839
  • 1
  • 15
  • 28
11
votes
1 answer

HTML5 notification with HTML elements inside

How can I insert HTML tags inside the title and body of HTML5 notifications?
user3655551
  • 111
  • 1
  • 4
8
votes
0 answers

Display alert sheet for allowing desktop notifications with WKWebView on OSX

I'm using WebKit2's WKWebView in a Cocoa+WebKit mac application. In the WebView I'm loading a page that sends notifications through the HTML5 Notification API (e.g. new Notification("notification")). When running Notification.requestPermission()…
relu
  • 158
  • 1
  • 6
6
votes
1 answer

Notification.requestPermissions - no dialog shown, "automatically blocked" message in Chrome

I'm testing HTML5 notifications on localhost, with SSL. I've reset the Chrome settings for the site (by clicking the lock icon in the URL box - "site settings"), and double checked notification setting is set to "Ask (default)". Now here's my…
Alex from Jitbit
  • 53,710
  • 19
  • 160
  • 149
6
votes
5 answers

How to include a link in the HTML5 notification?

I would like to be able to set a link/permalink to each notification, so when user clicks on it; then he is taken to the permalink location, I've seen this answer which has a solution that's a little bit different because static link is used, I…
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378
5
votes
3 answers

How to disable Webkit Notifications?

Is there a way I can give a user the option of disabling webkitNotifications? If I call requestPermission() a second time, it does not prompt the user.
user1502301
  • 565
  • 1
  • 4
  • 16
4
votes
2 answers

Let HTML5 Notification disappear after a delay?

I want to use HTML5 notifications which work great. The problem is that they never disappear. How can I set a delay after which the HTML5 notification disappear?
Michael
  • 32,527
  • 49
  • 210
  • 370
4
votes
1 answer

Reliably Dismissing Webkit Notifications

I'm successfully creating and dismissing webkit notifications like so: notification = window.webkitNotifications.createNotification('foo.png', 'bar', 'baz') notification.show() setTimeout -> notification.cancel() , 3000 However, the…
gregsabo
  • 430
  • 2
  • 9
3
votes
1 answer

Chrome's HTML 5 notifications in Windows 10 only allow one at a time?

As of yesterday, Chrome's notifications by default go through the Action Center on Windows 10. This is great, except when you want to send multiple notifications, it looks like only one of them is visible. If you want a persistant notification, that…
Skeets
  • 4,476
  • 2
  • 41
  • 67
1
2 3