Skip to main content

web_sys/features/
gen_IntersectionObserverEntry.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "IntersectionObserverEntry",
10        typescript_type = "IntersectionObserverEntry"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `IntersectionObserverEntry` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntry`*"]
18    pub type IntersectionObserverEntry;
19    #[wasm_bindgen(
20        method,
21        getter,
22        js_class = "IntersectionObserverEntry",
23        js_name = "time"
24    )]
25    #[doc = "Getter for the `time` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/time)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntry`*"]
30    pub fn time(this: &IntersectionObserverEntry) -> f64;
31    #[cfg(feature = "DomRectReadOnly")]
32    #[wasm_bindgen(
33        method,
34        getter,
35        js_class = "IntersectionObserverEntry",
36        js_name = "rootBounds"
37    )]
38    #[doc = "Getter for the `rootBounds` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/rootBounds)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `IntersectionObserverEntry`*"]
43    pub fn root_bounds(this: &IntersectionObserverEntry) -> Option<DomRectReadOnly>;
44    #[cfg(feature = "DomRectReadOnly")]
45    #[wasm_bindgen(
46        method,
47        getter,
48        js_class = "IntersectionObserverEntry",
49        js_name = "boundingClientRect"
50    )]
51    #[doc = "Getter for the `boundingClientRect` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/boundingClientRect)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `IntersectionObserverEntry`*"]
56    pub fn bounding_client_rect(this: &IntersectionObserverEntry) -> DomRectReadOnly;
57    #[cfg(feature = "DomRectReadOnly")]
58    #[wasm_bindgen(
59        method,
60        getter,
61        js_class = "IntersectionObserverEntry",
62        js_name = "intersectionRect"
63    )]
64    #[doc = "Getter for the `intersectionRect` field of this object."]
65    #[doc = ""]
66    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/intersectionRect)"]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `IntersectionObserverEntry`*"]
69    pub fn intersection_rect(this: &IntersectionObserverEntry) -> DomRectReadOnly;
70    #[wasm_bindgen(
71        method,
72        getter,
73        js_class = "IntersectionObserverEntry",
74        js_name = "isIntersecting"
75    )]
76    #[doc = "Getter for the `isIntersecting` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/isIntersecting)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntry`*"]
81    pub fn is_intersecting(this: &IntersectionObserverEntry) -> bool;
82    #[wasm_bindgen(
83        method,
84        getter,
85        js_class = "IntersectionObserverEntry",
86        js_name = "intersectionRatio"
87    )]
88    #[doc = "Getter for the `intersectionRatio` field of this object."]
89    #[doc = ""]
90    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/intersectionRatio)"]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntry`*"]
93    pub fn intersection_ratio(this: &IntersectionObserverEntry) -> f64;
94    #[cfg(feature = "Element")]
95    #[wasm_bindgen(
96        method,
97        getter,
98        js_class = "IntersectionObserverEntry",
99        js_name = "target"
100    )]
101    #[doc = "Getter for the `target` field of this object."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/target)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntry`*"]
106    pub fn target(this: &IntersectionObserverEntry) -> Element;
107}