ext.uls.eventlogger: Remove more obsolete deferred complexity

Follows-up c578db02 and ea671b1f, which I thought removed
all code relating to the old async EventLogging method.
I didn't notice this UI code at the time, because I only took a
single pass over the code to find dead code. Now that that code
is gone, it is clear that the UI code is also redundant.

The mw.track() and logEvent() methods don't track the Beacon API's
async fetches, which also isn't needed, since the loss of browser
context upon navigation doesn't abort background beacons.

The loading of the EL library itself is already ensured via a
dependency so we already know there won't be an async fetch for
that.

What that leaves is some portion of older browsers in which a
EventLogging falls back to 'new Image'. This is basically just
IE 11 per <https://caniuse.com/beacon>, and for those some portion
of events will have been lost since EventLogging removed support
two+ years ago for tracking those fallback fetches via a Promise
(because of the perf issues caused by what the removed code here
was able to do).

Change-Id: Idf4378f983b6ba0e755ebadb97aa6d87cf95f7a5
This commit is contained in:
Timo Tijhof
2020-10-23 00:27:24 +01:00
committed by Krinkle
parent f8fde38197
commit 09862cffec
4 changed files with 55 additions and 97 deletions

View File

@@ -57,12 +57,9 @@
/**
* Log language revert
*
* @param {jQuery.Deferred} deferred
*/
function ulsLanguageRevert( deferred ) {
function ulsLanguageRevert() {
log( { action: 'ui-lang-revert' } );
deferred.resolve();
}
/**
@@ -97,12 +94,9 @@
/**
* Log login link click in display settings.
*
* @param {jQuery.Deferred} deferred
*/
function loginClick( deferred ) {
function loginClick() {
log( { action: 'login-click' } );
deferred.resolve();
}
/**
@@ -119,9 +113,8 @@
* Log interface language change
*
* @param {string} language language code
* @param {jQuery.Deferred} deferred
*/
function interfaceLanguageChange( language, deferred ) {
function interfaceLanguageChange( language ) {
var logParams = {
action: 'language-change',
context: 'interface',
@@ -129,7 +122,6 @@
};
log( logParams );
deferred.resolve();
}
/**