@@ -73,26 +73,31 @@ export const IS_SCENEVIEWER_CANDIDATE = IS_ANDROID && !IS_FIREFOX && !IS_OCULUS;
73
73
// Extend Window type with webkit property,
74
74
// required to check if iOS is running within a WKWebView browser instance.
75
75
declare global {
76
- interface Window {
77
- webkit ?: any ;
78
- }
76
+ interface Window {
77
+ webkit ?: any ;
78
+ }
79
79
}
80
80
81
- export const IS_WKWEBVIEW = Boolean ( window . webkit && window . webkit . messageHandlers ) ;
81
+ export const IS_WKWEBVIEW =
82
+ Boolean ( window . webkit && window . webkit . messageHandlers ) ;
82
83
83
- // If running in iOS Safari proper, and not within a WKWebView component instance, check for ARQL feature support.
84
- // Otherwise, if running in a WKWebView instance, check for known ARQL compatible iOS browsers, including:
85
- // Chrome (CriOS), Edge (EdgiOS), Firefox (FxiOS), Google App (GSA), DuckDuckGo (DuckDuckGo).
86
- // All other iOS browsers / apps will fail by default.
84
+ // If running in iOS Safari proper, and not within a WKWebView component
85
+ // instance, check for ARQL feature support. Otherwise, if running in a
86
+ // WKWebView instance, check for known ARQL compatible iOS browsers, including:
87
+ // Chrome (CriOS), Edge (EdgiOS), Firefox (FxiOS), Google App (GSA), DuckDuckGo
88
+ // (DuckDuckGo). All other iOS browsers / apps will fail by default.
87
89
export const IS_AR_QUICKLOOK_CANDIDATE = ( ( ) => {
88
- if ( IS_IOS ) {
89
- if ( ! IS_WKWEBVIEW ) {
90
- const tempAnchor = document . createElement ( 'a' ) ;
91
- return Boolean ( tempAnchor . relList && tempAnchor . relList . supports && tempAnchor . relList . supports ( 'ar' ) ) ;
92
- } else {
93
- return Boolean ( / C r i O S \/ | E d g i O S \/ | F x i O S \/ | G S A \/ | D u c k D u c k G o \/ / . test ( navigator . userAgent ) ) ;
94
- }
90
+ if ( IS_IOS ) {
91
+ if ( ! IS_WKWEBVIEW ) {
92
+ const tempAnchor = document . createElement ( 'a' ) ;
93
+ return Boolean (
94
+ tempAnchor . relList && tempAnchor . relList . supports &&
95
+ tempAnchor . relList . supports ( 'ar' ) ) ;
95
96
} else {
96
- return false ;
97
+ return Boolean ( / C r i O S \/ | E d g i O S \/ | F x i O S \/ | G S A \/ | D u c k D u c k G o \/ / . test (
98
+ navigator . userAgent ) ) ;
97
99
}
100
+ } else {
101
+ return false ;
102
+ }
98
103
} ) ( ) ;
0 commit comments