<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] No way for applications to set notification permissions without waiting for permission request"
href="https://bugs.webkit.org/show_bug.cgi?id=163366#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] No way for applications to set notification permissions without waiting for permission request"
href="https://bugs.webkit.org/show_bug.cgi?id=163366">bug 163366</a>
from <span class="vcard"><a class="email" href="mailto:clopez@igalia.com" title="Carlos Alberto Lopez Perez <clopez@igalia.com>"> <span class="fn">Carlos Alberto Lopez Perez</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=163366#c3">comment #3</a>)
<span class="quote">> What's going wrong is that checking Notification.permission via JavaScript
> does not trigger a WebKitNotificationPermissionRequest (nor should it). The
> sites where notification permissions work properly simply don't check this
> property. If <a href="http://www.bennish.net/web-notifications.html">http://www.bennish.net/web-notifications.html</a> were to attempt
> to tell you if notifications are authorized without creating a permission
> request (via Notification.requestPermission()), then it would say that
> notifications are not authorized (even though the permission request would
> be automatically granted by the application. WebKit already has a means to
> prepopulate notification permissions (see <a href="show_bug.cgi?id=163366#c0">comment #0</a>) that we need to expose
> in the WebKitGTK+ API.</span >
I see. Thanks for the explanation.
I was confused, I was not checking properly that Notification.permission started with a value of "default" before the call to requestPermission()
Checked with the inspector:
<span class="quote">> Notification.permission</span >
< "default"
<span class="quote">> Notification.requestPermission()</span >
< undefined
<span class="quote">> Notification.permission</span >
< "granted"
Notification.permission</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>