| 1 | #![allow (unused_imports)] |
| 2 | #![allow (clippy::all)] |
| 3 | use super::*; |
| 4 | use wasm_bindgen::prelude::*; |
| 5 | #[wasm_bindgen ] |
| 6 | unsafeextern "C" { |
| 7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = IntersectionObserver , typescript_type = "IntersectionObserver" )] |
| 8 | #[derive (Debug, Clone, PartialEq, Eq)] |
| 9 | #[doc = "The `IntersectionObserver` class." ] |
| 10 | #[doc = "" ] |
| 11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver)" ] |
| 12 | #[doc = "" ] |
| 13 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`*" ] |
| 14 | pub type IntersectionObserver; |
| 15 | #[cfg (feature = "Element" )] |
| 16 | # [wasm_bindgen (structural , method , getter , js_class = "IntersectionObserver" , js_name = root)] |
| 17 | #[doc = "Getter for the `root` field of this object." ] |
| 18 | #[doc = "" ] |
| 19 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root)" ] |
| 20 | #[doc = "" ] |
| 21 | #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserver`*" ] |
| 22 | pub unsafefn root(this: &IntersectionObserver) -> Option<Element>; |
| 23 | # [wasm_bindgen (structural , method , getter , js_class = "IntersectionObserver" , js_name = rootMargin)] |
| 24 | #[doc = "Getter for the `rootMargin` field of this object." ] |
| 25 | #[doc = "" ] |
| 26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)" ] |
| 27 | #[doc = "" ] |
| 28 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`*" ] |
| 29 | pub unsafefn root_margin(this: &IntersectionObserver) -> ::alloc::string::String; |
| 30 | # [wasm_bindgen (structural , method , getter , js_class = "IntersectionObserver" , js_name = thresholds)] |
| 31 | #[doc = "Getter for the `thresholds` field of this object." ] |
| 32 | #[doc = "" ] |
| 33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/thresholds)" ] |
| 34 | #[doc = "" ] |
| 35 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`*" ] |
| 36 | pub unsafefn thresholds(this: &IntersectionObserver) -> ::js_sys::Array; |
| 37 | #[wasm_bindgen (catch, constructor, js_class = "IntersectionObserver" )] |
| 38 | #[doc = "The `new IntersectionObserver(..)` constructor, creating a new instance of `IntersectionObserver`." ] |
| 39 | #[doc = "" ] |
| 40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver)" ] |
| 41 | #[doc = "" ] |
| 42 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`*" ] |
| 43 | pub unsafefn new(intersection_callback: &::js_sys::Function) |
| 44 | -> Result<IntersectionObserver, JsValue>; |
| 45 | #[cfg (feature = "IntersectionObserverInit" )] |
| 46 | #[wasm_bindgen (catch, constructor, js_class = "IntersectionObserver" )] |
| 47 | #[doc = "The `new IntersectionObserver(..)` constructor, creating a new instance of `IntersectionObserver`." ] |
| 48 | #[doc = "" ] |
| 49 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver)" ] |
| 50 | #[doc = "" ] |
| 51 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`, `IntersectionObserverInit`*" ] |
| 52 | pub fn new_with_options( |
| 53 | intersection_callback: &::js_sys::Function, |
| 54 | options: &IntersectionObserverInit, |
| 55 | ) -> Result<IntersectionObserver, JsValue>; |
| 56 | # [wasm_bindgen (method , structural , js_class = "IntersectionObserver" , js_name = disconnect)] |
| 57 | #[doc = "The `disconnect()` method." ] |
| 58 | #[doc = "" ] |
| 59 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/disconnect)" ] |
| 60 | #[doc = "" ] |
| 61 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`*" ] |
| 62 | pub unsafefn disconnect(this: &IntersectionObserver); |
| 63 | #[cfg (feature = "Element" )] |
| 64 | # [wasm_bindgen (method , structural , js_class = "IntersectionObserver" , js_name = observe)] |
| 65 | #[doc = "The `observe()` method." ] |
| 66 | #[doc = "" ] |
| 67 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/observe)" ] |
| 68 | #[doc = "" ] |
| 69 | #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserver`*" ] |
| 70 | pub unsafefn observe(this: &IntersectionObserver, target: &Element); |
| 71 | # [wasm_bindgen (method , structural , js_class = "IntersectionObserver" , js_name = takeRecords)] |
| 72 | #[doc = "The `takeRecords()` method." ] |
| 73 | #[doc = "" ] |
| 74 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/takeRecords)" ] |
| 75 | #[doc = "" ] |
| 76 | #[doc = "*This API requires the following crate features to be activated: `IntersectionObserver`*" ] |
| 77 | pub unsafefn take_records(this: &IntersectionObserver) -> ::js_sys::Array; |
| 78 | #[cfg (feature = "Element" )] |
| 79 | # [wasm_bindgen (method , structural , js_class = "IntersectionObserver" , js_name = unobserve)] |
| 80 | #[doc = "The `unobserve()` method." ] |
| 81 | #[doc = "" ] |
| 82 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/unobserve)" ] |
| 83 | #[doc = "" ] |
| 84 | #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserver`*" ] |
| 85 | pub unsafefn unobserve(this: &IntersectionObserver, target: &Element); |
| 86 | } |
| 87 | |