Mattflaschen has submitted this change and it was merged.
Change subject: Use $( window ).load to avoid potentially clobbering handlers
......................................................................
Use $( window ).load to avoid potentially clobbering handlers
* Use location global
Change-Id: I526e3ff9e7dea89a6abf5c0b907b3949fe903591
---
M modules/ext.navigationTiming.js
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Mattflaschen: Verified; Looks good to me, approved
diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js
index 4bf083c..540fe05 100644
--- a/modules/ext.navigationTiming.js
+++ b/modules/ext.navigationTiming.js
@@ -25,7 +25,7 @@
function emitTiming() {
var event = {
userAgent : navigator.userAgent,
- isHttps : window.location.protocol === 'https:'
+ isHttps : location.protocol === 'https:'
};
if ( $.isPlainObject( window.Geo ) && typeof Geo.country ===
'string' ) {
@@ -55,9 +55,9 @@
if ( timing && inSample() ) {
// ensure we run after loadEventEnd.
- window.onload = function () {
- window.setTimeout( emitTiming, 0 );
- };
+ $( window ).load( function () {
+ setTimeout( emitTiming, 0 );
+ } );
}
} ( mediaWiki, jQuery ) );
--
To view, visit https://gerrit.wikimedia.org/r/53863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I526e3ff9e7dea89a6abf5c0b907b3949fe903591
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/NavigationTiming
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits