[Webkit-unassigned] [Bug 194897] New: navigator.sendBeacon does not work on visibilitychange callback for document unload

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 21 06:22:40 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=194897

            Bug ID: 194897
           Summary: navigator.sendBeacon does not work on visibilitychange
                    callback for document unload
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Macintosh
                OS: macOS 10.14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bastien.caudan at gmail.com

With the example from the beacon spec (https://w3c.github.io/beacon/):

document.addEventListener('visibilitychange', function() {
  if (document.visibilityState === 'hidden') {
    navigator.sendBeacon('/collector', data);
  }
});


>From manual tests on hidden cases, navigator.sendBeacon is triggered correctly when:
- the browser is minimized.
- the document is not the active tab

But navigator.sendBeacon is not triggered when:
- the browser unload the document

Other browsers that support the Beacon API allow these requests to be sent.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190221/0384e049/attachment-0001.html>


More information about the webkit-unassigned mailing list