Skip to content

Commit ebbae7a

Browse files
shakyShaneShane Osbourne
and
Shane Osbourne
authored
fix(web-compat): run web-compat first in webkit environments (#606)
* fix(web-compat): ensure webCompat runs before fingerprinting * remove `fit` --------- Co-authored-by: Shane Osbourne <[email protected]>
1 parent 2d9e5e4 commit ebbae7a

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

src/features.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const otherFeatures = /** @type {const} */([
2727
/** @type {Record<string, FeatureName[]>} */
2828
export const platformSupport = {
2929
apple: [
30-
...baseFeatures,
31-
'webCompat'
30+
'webCompat',
31+
...baseFeatures
3232
],
3333
'apple-isolated': [
3434
'duckPlayer'

unit-test/features.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { platformSupport } from '../src/features.js'
2+
3+
describe('Features definition', () => {
4+
it('calls `webCompat` before `fingerPrintingScreenSize` https://app.asana.com/0/1177771139624306/1204944717262422/f', () => {
5+
// ensuring this order doesn't change, as it recently caused breakage
6+
expect(platformSupport.apple).toEqual([
7+
'webCompat',
8+
'runtimeChecks',
9+
'fingerprintingAudio',
10+
'fingerprintingBattery',
11+
'fingerprintingCanvas',
12+
'cookie',
13+
'googleRejected',
14+
'gpc',
15+
'fingerprintingHardware',
16+
'referrer',
17+
'fingerprintingScreenSize',
18+
'fingerprintingTemporaryStorage',
19+
'navigatorInterface',
20+
'elementHiding',
21+
'exceptionHandler'
22+
])
23+
})
24+
})

0 commit comments

Comments
 (0)