1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "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 pub type ResizeObserver;
15 #[wasm_bindgen(catch, constructor, js_class = "ResizeObserver")]
16 #[doc = "The `new ResizeObserver(..)` constructor, creating a new instance of `ResizeObserver`."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"]
21 pub fn new(callback: &::js_sys::Function) -> Result<ResizeObserver, JsValue>;
22 # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = disconnect)]
23 #[doc = "The `disconnect()` method."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/disconnect)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `ResizeObserver`*"]
28 pub fn disconnect(this: &ResizeObserver);
29 #[cfg(feature = "Element")]
30 # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = observe)]
31 #[doc = "The `observe()` method."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`*"]
36 pub fn observe(this: &ResizeObserver, target: &Element);
37 #[cfg(all(feature = "Element", feature = "ResizeObserverOptions",))]
38 # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = observe)]
39 #[doc = "The `observe()` method."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`, `ResizeObserverOptions`*"]
44 pub fn observe_with_options(
45 this: &ResizeObserver,
46 target: &Element,
47 options: &ResizeObserverOptions,
48 );
49 #[cfg(feature = "Element")]
50 # [wasm_bindgen (method , structural , js_class = "ResizeObserver" , js_name = unobserve)]
51 #[doc = "The `unobserve()` method."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `Element`, `ResizeObserver`*"]
56 pub fn unobserve(this: &ResizeObserver, target: &Element);
57}
58