File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,19 @@ const getDeviceDiagnostics = (windowSize: { width?: number; height?: number }) =
69
69
property : translate ( "diagnostics.device.viewportHeight" ) ,
70
70
value : ( windowSize . height ?? window . innerHeight ) + "px" ,
71
71
} ,
72
+ {
73
+ property : translate ( "diagnostics.device.isWebAssemblySupported" ) ,
74
+ value : `${ checkIfWebAssemblyIsSupported ( ) } ` ,
75
+ } ,
72
76
]
73
77
}
74
78
79
+ const checkIfWebAssemblyIsSupported = ( ) => {
80
+ // Check for WebAssembly presence
81
+ if ( typeof WebAssembly === "object" && typeof WebAssembly . instantiate === "function" ) {
82
+ return true
83
+ }
84
+ return false
85
+ }
86
+
75
87
export default observer ( DiagnosticsView )
Original file line number Diff line number Diff line change 115
115
"device" : " Device" ,
116
116
"userAgent" : " User agent" ,
117
117
"viewportHeight" : " Viewport height" ,
118
- "viewportWidth" : " Viewport width"
118
+ "viewportWidth" : " Viewport width" ,
119
+ "isWebAssemblySupported" : " WebAssembly supported"
119
120
},
120
121
"diagnostics" : " Diagnostics"
121
122
},
You can’t perform that action at this time.
0 commit comments