Merge branch 'develop' of https://github.com/vector-im/element-web into t3chguy/modernizr-webaudio

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	src/vector/modernizr.js
This commit is contained in:
Michael Telatynski 2024-07-17 19:58:17 +01:00
commit 1eea7fffbe
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
4 changed files with 2002 additions and 11 deletions

View file

@ -1,5 +1,5 @@
{
"minify": true,
"minify": false,
"enableClasses": false,
"feature-detects": [
"test/css/animations",
@ -7,24 +7,19 @@
"test/css/filters",
"test/css/flexbox",
"test/css/objectfit",
"test/es5/date",
"test/es5/function",
"test/es5/object",
"test/es5/undefined",
"test/es6/array",
"test/es6/collections",
"test/es6/promises",
"test/es6/string",
"test/svg",
"test/svg/asimg",
"test/svg/filters",
"test/url/parser",
"test/url/urlsearchparams",
"test/cors",
"test/crypto",
"test/iframe/sandbox",
@ -34,4 +29,4 @@
"test/window/resizeobserver",
"test/audio/webaudio"
]
}
}

View file

@ -10,5 +10,5 @@ sonar.exclusions=__mocks__,docs,element.io,nginx
sonar.typescript.tsconfigPath=./tsconfig.json
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=test/**/*,res/**/*
sonar.coverage.exclusions=test/**/*,res/**/*,src/vector/modernizr.js
sonar.testExecutionReportPaths=coverage/jest-sonar-report.xml

View file

@ -75,6 +75,8 @@ function checkBrowserFeatures(): boolean {
() => window.RegExp?.prototype && "unicodeSets" in window.RegExp.prototype,
);
// ES2024: https://402.ecma-international.org/9.0/#sec-intl.segmenter
// The built-in modernizer 'intl' check only checks for the presence of the Intl object, not the Segmenter,
// and older Firefox has the former but not the latter, so we add our own.
window.Modernizr.addTest("intlsegmenter", () => typeof window.Intl?.Segmenter === "function");
const featureList = Object.keys(window.Modernizr) as Array<keyof ModernizrStatic>;

File diff suppressed because one or more lines are too long