diff --git a/crates/web-sys/src/features/gen_ResizeObserver.rs b/crates/web-sys/src/features/gen_ResizeObserver.rs index 58c0bce77f7f..5243b438d72b 100644 --- a/crates/web-sys/src/features/gen_ResizeObserver.rs +++ b/crates/web-sys/src/features/gen_ResizeObserver.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ResizeObserver , typescript_type = "ResizeObserver")] @@ -12,33 +11,21 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"] - #[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 type ResizeObserver; - #[cfg(web_sys_unstable_apis)] #[wasm_bindgen(catch, constructor, js_class = "ResizeObserver")] #[doc = "The `new ResizeObserver(..)` constructor, creating a new instance of `ResizeObserver`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"] - #[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 new(callback: &::js_sys::Function) -> Result; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = disconnect)] #[doc = "The `disconnect()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/disconnect)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"] - #[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 disconnect(this: &ResizeObserver); - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "Element")] # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = observe)] #[doc = "The `observe()` method."] @@ -46,11 +33,7 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`*"] - #[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 observe(this: &ResizeObserver, target: &Element); - #[cfg(web_sys_unstable_apis)] #[cfg(all(feature = "Element", feature = "ResizeObserverOptions",))] # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = observe)] #[doc = "The `observe()` method."] @@ -58,15 +41,11 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`, `ResizeObserverOptions`*"] - #[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 observe_with_options( this: &ResizeObserver, target: &Element, options: &ResizeObserverOptions, ); - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "Element")] # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = unobserve)] #[doc = "The `unobserve()` method."] @@ -74,8 +53,5 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`*"] - #[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 unobserve(this: &ResizeObserver, target: &Element); } diff --git a/crates/web-sys/src/features/gen_ResizeObserverBoxOptions.rs b/crates/web-sys/src/features/gen_ResizeObserverBoxOptions.rs index ab062f5462b1..827b3d99d846 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverBoxOptions.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverBoxOptions.rs @@ -1,14 +1,10 @@ #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] #[doc = "The `ResizeObserverBoxOptions` enum."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`*"] -#[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)*"] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ResizeObserverBoxOptions { BorderBox = "border-box", diff --git a/crates/web-sys/src/features/gen_ResizeObserverEntry.rs b/crates/web-sys/src/features/gen_ResizeObserverEntry.rs index 8d61baf8da3e..fd7ed79e8452 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverEntry.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverEntry.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ResizeObserverEntry , typescript_type = "ResizeObserverEntry")] @@ -12,11 +11,7 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverEntry`*"] - #[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 type ResizeObserverEntry; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "Element")] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverEntry" , js_name = target)] #[doc = "Getter for the `target` field of this object."] @@ -24,11 +19,7 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/target)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserverEntry`*"] - #[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 target(this: &ResizeObserverEntry) -> Element; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectReadOnly")] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverEntry" , js_name = contentRect)] #[doc = "Getter for the `contentRect` field of this object."] @@ -36,41 +27,26 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/contentRect)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `ResizeObserverEntry`*"] - #[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 content_rect(this: &ResizeObserverEntry) -> DomRectReadOnly; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverEntry" , js_name = borderBoxSize)] #[doc = "Getter for the `borderBoxSize` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/borderBoxSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverEntry`*"] - #[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 border_box_size(this: &ResizeObserverEntry) -> ::js_sys::Array; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverEntry" , js_name = contentBoxSize)] #[doc = "Getter for the `contentBoxSize` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/contentBoxSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverEntry`*"] - #[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 content_box_size(this: &ResizeObserverEntry) -> ::js_sys::Array; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverEntry" , js_name = devicePixelContentBoxSize)] #[doc = "Getter for the `devicePixelContentBoxSize` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/devicePixelContentBoxSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverEntry`*"] - #[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 device_pixel_content_box_size(this: &ResizeObserverEntry) -> ::js_sys::Array; } diff --git a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs index 1caef54a67e0..cbd81683fee1 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ResizeObserverOptions)] @@ -10,32 +9,21 @@ extern "C" { #[doc = "The `ResizeObserverOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*"] - #[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 type ResizeObserverOptions; } -#[cfg(web_sys_unstable_apis)] impl ResizeObserverOptions { #[doc = "Construct a new `ResizeObserverOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*"] - #[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 new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ResizeObserverBoxOptions")] #[doc = "Change the `box` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] - #[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 box_(&mut self, val: ResizeObserverBoxOptions) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("box"), &JsValue::from(val)); @@ -47,7 +35,6 @@ impl ResizeObserverOptions { self } } -#[cfg(web_sys_unstable_apis)] impl Default for ResizeObserverOptions { fn default() -> Self { Self::new() diff --git a/crates/web-sys/src/features/gen_ResizeObserverSize.rs b/crates/web-sys/src/features/gen_ResizeObserverSize.rs index 19f8f7208fde..c7a52499fde0 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverSize.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverSize.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ResizeObserverSize , typescript_type = "ResizeObserverSize")] @@ -12,30 +11,19 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverSize`*"] - #[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 type ResizeObserverSize; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverSize" , js_name = inlineSize)] #[doc = "Getter for the `inlineSize` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverSize/inlineSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverSize`*"] - #[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 inline_size(this: &ResizeObserverSize) -> f64; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "ResizeObserverSize" , js_name = blockSize)] #[doc = "Getter for the `blockSize` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverSize/blockSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverSize`*"] - #[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 block_size(this: &ResizeObserverSize) -> f64; } diff --git a/crates/web-sys/webidls/unstable/ResizeObserver.webidl b/crates/web-sys/webidls/enabled/ResizeObserver.webidl similarity index 100% rename from crates/web-sys/webidls/unstable/ResizeObserver.webidl rename to crates/web-sys/webidls/enabled/ResizeObserver.webidl