MCPcopy Create free account
hub / github.com/ampproject/amphtml / getSendBeacon

Method getSendBeacon

src/core/window/interface.js:77–82  ·  view source on GitHub ↗

* @static * @param {Window} win * @return {undefined|function(string,(ArrayBufferView|Blob|FormData|null|string)=):boolean}

(win)

Source from the content-addressed store, hash-verified

75 * @return {undefined|function(string,(ArrayBufferView|Blob|FormData|null|string)=):boolean}
76 */
77 static getSendBeacon(win) {
78 if (!win.navigator.sendBeacon) {
79 return undefined;
80 }
81 return win.navigator.sendBeacon.bind(win.navigator);
82 }
83
84 /**
85 * @static

Callers 2

sendBeaconMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected