File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -154,19 +154,23 @@ export function wrapWindowsScripts(js, replacements) {
154
154
delete window.chrome.webview.addEventListener;
155
155
delete window.chrome.webview.removeEventListener;
156
156
if (typeof Bluetooth === 'undefined') {
157
+ globalThis.Bluetooth = {};
157
158
globalThis.Bluetooth.prototype = { requestDevice: async () => { /* noop */ } }
158
159
}
159
160
// @ts-expect-error - testing
160
161
if (typeof USB === 'undefined') {
162
+ globalThis.USB = {};
161
163
globalThis.USB.prototype = { requestDevice: async () => { /* noop */ } }
162
164
}
163
165
164
166
// @ts-expect-error - testing
165
167
if (typeof Serial === 'undefined') {
168
+ globalThis.Serial = {};
166
169
globalThis.Serial.prototype = { requestPort: async () => { /* noop */ } }
167
170
}
168
171
// @ts-expect-error - testing
169
172
if (typeof HID === 'undefined') {
173
+ globalThis.HID = {};
170
174
globalThis.HID.prototype = { requestDevice: async () => { /* noop */ } }
171
175
}
172
176
${ js }
You can’t perform that action at this time.
0 commit comments