tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

event-onclick-manual.https.html (870B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Notification.onclick (basic)</title>
      4 <link rel="author" title="Apple Inc." href="http://www.apple.com/">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="common.js"></script>
      8 <script>
      9 setup({ explicit_timeout: true })
     10 if (hasNotificationPermission()) {
     11    async_test(function (t) {
     12        t.step(function () {
     13            var notification =
     14                new Notification("Please click on the notification.", {
     15                    body: "Click me to test clicking on notifications."
     16                })
     17            notification.onclick = function(e) {
     18                assert_equals(Object.prototype.toString.call(e), "[object Event]")
     19                assert_equals(e.type, "click")
     20                t.done()
     21            }
     22        })
     23    })
     24 }
     25 </script>