You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/JavaScriptKit/JS Types/JSBluetooth.swift
+59-17Lines changed: 59 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ public final class JSBluetooth: JSType {
24
24
25
25
// MARK: - Accessors
26
26
27
+
/**
28
+
Returns a Promise that resolved to a Boolean indicating whether the user-agent has the ability to support Bluetooth. Some user-agents let the user configure an option that affects what is returned by this value. If this option is set, that is the value returned by this method.
29
+
*/
27
30
publicvarisAvailable:JSPromise<Bool>{
28
31
guardlet function = jsObject.getAvailability.function
29
32
else{fatalError("Invalid function \(#function)")}
@@ -33,38 +36,77 @@ public final class JSBluetooth: JSType {
33
36
return promise
34
37
}
35
38
39
+
/**
40
+
Returns a `Promise` that resolved to an array of `BluetoothDevice` which the origin already obtained permission for via a call to `Bluetooth.requestDevice()`.
0 commit comments