check browser support for regex look behind

this commit drops support for iOS 16.2 due to an issue with regex
support

Co-authored-by: sug <sug@tutao.de>
This commit is contained in:
kib 2025-12-04 16:31:57 +01:00
parent e703609e87
commit df0b6f7b71
No known key found for this signature in database
GPG key ID: 79B7666BAB6012A0

View file

@ -134,7 +134,7 @@ export class ClientDetector {
*/
isSupported(): boolean {
this.syntaxChecks()
return this.isSupportedBrowserVersion() && this.testBuiltins() && this.websockets() && this.testCss()
return this.isSupportedBrowserVersion() && this.testBuiltins() && this.websockets() && this.testCss() && this.lookBehindRegex()
}
isMobileDevice(): boolean {
@ -184,6 +184,15 @@ export class ClientDetector {
return "XMLHttpRequest" in window
}
lookBehindRegex(): boolean {
try {
;/(?<=([ab]+)([bc]+))$/.exec("abc")
return true
} catch (e) {
return false
}
}
indexedDb(): boolean {
try {
return window.indexedDB != null