|
| 1 | +#![allow(unused_imports)] |
| 2 | +use super::*; |
| 3 | +use wasm_bindgen::prelude::*; |
| 4 | +#[cfg(web_sys_unstable_apis)] |
| 5 | +#[wasm_bindgen] |
| 6 | +extern "C" { |
| 7 | + # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ResizeObserver , typescript_type = "ResizeObserver")] |
| 8 | + #[derive(Debug, Clone, PartialEq, Eq)] |
| 9 | + #[doc = "The `ResizeObserver` class."] |
| 10 | + #[doc = ""] |
| 11 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)"] |
| 12 | + #[doc = ""] |
| 13 | + #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"] |
| 14 | + #[doc = ""] |
| 15 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 16 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 17 | + pub type ResizeObserver; |
| 18 | + #[cfg(web_sys_unstable_apis)] |
| 19 | + #[wasm_bindgen(catch, constructor, js_class = "ResizeObserver")] |
| 20 | + #[doc = "The `new ResizeObserver(..)` constructor, creating a new instance of `ResizeObserver`."] |
| 21 | + #[doc = ""] |
| 22 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver)"] |
| 23 | + #[doc = ""] |
| 24 | + #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"] |
| 25 | + #[doc = ""] |
| 26 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 27 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 28 | + pub fn new(callback: &::js_sys::Function) -> Result<ResizeObserver, JsValue>; |
| 29 | + #[cfg(web_sys_unstable_apis)] |
| 30 | + # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = disconnect)] |
| 31 | + #[doc = "The `disconnect()` method."] |
| 32 | + #[doc = ""] |
| 33 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/disconnect)"] |
| 34 | + #[doc = ""] |
| 35 | + #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"] |
| 36 | + #[doc = ""] |
| 37 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 38 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 39 | + pub fn disconnect(this: &ResizeObserver); |
| 40 | + #[cfg(web_sys_unstable_apis)] |
| 41 | + #[cfg(feature = "Element")] |
| 42 | + # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = observe)] |
| 43 | + #[doc = "The `observe()` method."] |
| 44 | + #[doc = ""] |
| 45 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe)"] |
| 46 | + #[doc = ""] |
| 47 | + #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`*"] |
| 48 | + #[doc = ""] |
| 49 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 50 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 51 | + pub fn observe(this: &ResizeObserver, target: &Element); |
| 52 | + #[cfg(web_sys_unstable_apis)] |
| 53 | + #[cfg(all(feature = "Element", feature = "ResizeObserverOptions",))] |
| 54 | + # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = observe)] |
| 55 | + #[doc = "The `observe()` method."] |
| 56 | + #[doc = ""] |
| 57 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe)"] |
| 58 | + #[doc = ""] |
| 59 | + #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`, `ResizeObserverOptions`*"] |
| 60 | + #[doc = ""] |
| 61 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 62 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 63 | + pub fn observe_with_options( |
| 64 | + this: &ResizeObserver, |
| 65 | + target: &Element, |
| 66 | + options: &ResizeObserverOptions, |
| 67 | + ); |
| 68 | + #[cfg(web_sys_unstable_apis)] |
| 69 | + #[cfg(feature = "Element")] |
| 70 | + # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = unobserve)] |
| 71 | + #[doc = "The `unobserve()` method."] |
| 72 | + #[doc = ""] |
| 73 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve)"] |
| 74 | + #[doc = ""] |
| 75 | + #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`*"] |
| 76 | + #[doc = ""] |
| 77 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 78 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 79 | + pub fn unobserve(this: &ResizeObserver, target: &Element); |
| 80 | +} |
0 commit comments