blob: 41f8e18c6730ccee78311e3b699f6e38b584877c [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>Notification permission helper</title>
</head>
<body>
<script>
Promise.all([
Notification.requestPermission(),
navigator.permissions.query({ name: 'notifications' }),
navigator.permissions.query({ name: 'push', userVisibleOnly: true }),
]).then(results => {
parent.postMessage({
notificationPermission: Notification.permission,
notificationRequestPermission: results[0],
permissionApiNotificationPermission: results[1].state,
permissionApiPushPermission: results[2].state
}, '*' /* all origins */);
});
</script>
</body>
</html>