2023-09-12 09:56:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
Limit RelatedArticles feature to ES6 browsers
We currently require support for IntersectionObserver.
which is supported on Edge >= 15 (15 has partial support),
Firefox >55, Chrome >58, Safari 12.1, Opera >=38,
iOS Safari >=12.2, Android 100
Full ES6 is supported in Edge >=15, Firefox >=54, Chrome >=51,
Safari >=10, Opera >=38, iOS Safari >=10, so such a change
would only drop support for Edge 15 and Firefox 54.
CSS.escape is guaranteed in all these browsers according to
caniuse, with the only discrepancy being the Edge browser (versions
16-18) so it is also suggested we remove support for those browsers.
Firefox 54 accounts for 0.0026% of page views
Edge 15-18 accounts for 0.069% of page views
Bug: T306355
Change-Id: Id2987e3456607b610c38da9ee157a026d1d00ada
2022-04-18 22:20:04 +00:00
|
|
|
const wikimediaTestingUtils = require( '@wikimedia/mw-node-qunit' );
|
|
|
|
const fn = () => {};
|
2022-04-18 21:06:41 +00:00
|
|
|
|
|
|
|
global.CSS = {
|
Limit RelatedArticles feature to ES6 browsers
We currently require support for IntersectionObserver.
which is supported on Edge >= 15 (15 has partial support),
Firefox >55, Chrome >58, Safari 12.1, Opera >=38,
iOS Safari >=12.2, Android 100
Full ES6 is supported in Edge >=15, Firefox >=54, Chrome >=51,
Safari >=10, Opera >=38, iOS Safari >=10, so such a change
would only drop support for Edge 15 and Firefox 54.
CSS.escape is guaranteed in all these browsers according to
caniuse, with the only discrepancy being the Edge browser (versions
16-18) so it is also suggested we remove support for those browsers.
Firefox 54 accounts for 0.0026% of page views
Edge 15-18 accounts for 0.069% of page views
Bug: T306355
Change-Id: Id2987e3456607b610c38da9ee157a026d1d00ada
2022-04-18 22:20:04 +00:00
|
|
|
escape: ( str ) => str
|
2022-04-18 21:06:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
global.OO = {
|
Limit RelatedArticles feature to ES6 browsers
We currently require support for IntersectionObserver.
which is supported on Edge >= 15 (15 has partial support),
Firefox >55, Chrome >58, Safari 12.1, Opera >=38,
iOS Safari >=12.2, Android 100
Full ES6 is supported in Edge >=15, Firefox >=54, Chrome >=51,
Safari >=10, Opera >=38, iOS Safari >=10, so such a change
would only drop support for Edge 15 and Firefox 54.
CSS.escape is guaranteed in all these browsers according to
caniuse, with the only discrepancy being the Edge browser (versions
16-18) so it is also suggested we remove support for those browsers.
Firefox 54 accounts for 0.0026% of page views
Edge 15-18 accounts for 0.069% of page views
Bug: T306355
Change-Id: Id2987e3456607b610c38da9ee157a026d1d00ada
2022-04-18 22:20:04 +00:00
|
|
|
inheritClass: ( ClassNameObject ) => {
|
2022-04-18 21:06:41 +00:00
|
|
|
ClassNameObject.super = fn;
|
|
|
|
ClassNameObject.prototype.on = fn;
|
|
|
|
},
|
|
|
|
initClass: fn,
|
|
|
|
EventEmitter: fn
|
|
|
|
};
|
|
|
|
|
2023-04-03 20:45:43 +00:00
|
|
|
const { TextEncoder, TextDecoder } = require( 'util' );
|
|
|
|
global.TextEncoder = TextEncoder;
|
|
|
|
global.TextDecoder = TextDecoder;
|
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
wikimediaTestingUtils.setUp( /* disable QUnit sandboxing feature */ false );
|