diff --git a/crates/web-sys/src/features/gen_Bluetooth.rs b/crates/web-sys/src/features/gen_Bluetooth.rs index 2ac15144899..826ee01af10 100644 --- a/crates/web-sys/src/features/gen_Bluetooth.rs +++ b/crates/web-sys/src/features/gen_Bluetooth.rs @@ -204,17 +204,6 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn get_devices(this: &Bluetooth) -> ::js_sys::Promise; #[cfg(web_sys_unstable_apis)] - # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = requestDevice)] - #[doc = "The `requestDevice()` method."] - #[doc = ""] - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice)"] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn request_device(this: &Bluetooth) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "RequestDeviceOptions")] # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = requestDevice)] #[doc = "The `requestDevice()` method."] @@ -225,8 +214,5 @@ extern "C" { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn request_device_with_options( - this: &Bluetooth, - options: &RequestDeviceOptions, - ) -> ::js_sys::Promise; + pub fn request_device(this: &Bluetooth, options: &RequestDeviceOptions) -> ::js_sys::Promise; } diff --git a/crates/web-sys/src/features/gen_Navigator.rs b/crates/web-sys/src/features/gen_Navigator.rs index 008f86c0942..bce72048b23 100644 --- a/crates/web-sys/src/features/gen_Navigator.rs +++ b/crates/web-sys/src/features/gen_Navigator.rs @@ -115,7 +115,7 @@ extern "C" { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bluetooth(this: &Navigator) -> Bluetooth; + pub fn bluetooth(this: &Navigator) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "Clipboard")] # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = clipboard)] diff --git a/crates/web-sys/webidls/unstable/Bluetooth.webidl b/crates/web-sys/webidls/unstable/Bluetooth.webidl index 68c2a4d4bab..3ebf4ea552e 100644 --- a/crates/web-sys/webidls/unstable/Bluetooth.webidl +++ b/crates/web-sys/webidls/unstable/Bluetooth.webidl @@ -26,7 +26,7 @@ interface Bluetooth : EventTarget { [SameObject] readonly attribute BluetoothDevice? referringDevice; Promise> getDevices(); - Promise requestDevice(optional RequestDeviceOptions options = {}); + Promise requestDevice(RequestDeviceOptions options); }; Bluetooth includes BluetoothDeviceEventHandlers; @@ -232,5 +232,5 @@ typedef (DOMString or unsigned long) BluetoothDescriptorUUID; [SecureContext] partial interface Navigator { [SameObject] - readonly attribute Bluetooth bluetooth; -}; \ No newline at end of file + readonly attribute Bluetooth? bluetooth; +};