BeaconRequest = function (option) {
		option = option || {};

		if (!BeaconRequest.isSupported()) {
			throw Error("Beacon API is not supported");
		}

		if (typeof option.url !== "string") {
			throw Error("Beacon url must be valid");
		}

		this._nMaxBufferLength = option.maxBufferLength || 10;
		this._aBuffer = [];
		this._sUrl = option.url;

		/**
		 * Send data if the document visibility has changed to 'hidden'.
		 * That's the case if the tab inactive e.g. by switching to another tab
		 * or in case the active tab is closed. On mobile devices it's the only
		 * reliable event for detecting tab switch or minimizing/closing the
		 * browser.
		 * Previously also the 'pagehide' event was needed because safari did not
		 * fire the 'visibilitychange' event on navigating away from a page but
		 * as of Safari 14.5 this issue is fixed.
		 */
		document.addEventListener("visibilitychange", function () {
			if (document.visibilityState === "hidden") {
				this.send();
			}
		}.bind(this));
	}
A helper for buffering and sending BeaconRequests to a certain URL

@param {object} option Options for beacon API initialization
@param {string} option.url beacon URL
@param {string} option.maxBufferLength Number of entries in the stack before the beacon is send
@private
@ui5-restricted sap.ui.core