Skip to main content

web_sys/features/
gen_KeyframeEffect.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 = "AnimationEffect",
9        extends = "::js_sys::Object",
10        js_name = "KeyframeEffect",
11        typescript_type = "KeyframeEffect"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `KeyframeEffect` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffect`*"]
19    pub type KeyframeEffect;
20    #[wasm_bindgen(method, getter, js_class = "KeyframeEffect", js_name = "target")]
21    #[doc = "Getter for the `target` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/target)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffect`*"]
26    pub fn target(this: &KeyframeEffect) -> Option<::js_sys::Object>;
27    #[wasm_bindgen(method, setter, js_class = "KeyframeEffect", js_name = "target")]
28    #[doc = "Setter for the `target` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/target)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffect`*"]
33    #[deprecated]
34    pub fn set_target(this: &KeyframeEffect, value: Option<&::js_sys::Object>);
35    #[cfg(feature = "Element")]
36    #[wasm_bindgen(method, setter, js_class = "KeyframeEffect", js_name = "target")]
37    #[doc = "Setter for the `target` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/target)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `Element`, `KeyframeEffect`*"]
42    pub fn set_target_opt_element(this: &KeyframeEffect, value: Option<&Element>);
43    #[cfg(feature = "CssPseudoElement")]
44    #[wasm_bindgen(method, setter, js_class = "KeyframeEffect", js_name = "target")]
45    #[doc = "Setter for the `target` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/target)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `CssPseudoElement`, `KeyframeEffect`*"]
50    pub fn set_target_opt_css_pseudo_element(
51        this: &KeyframeEffect,
52        value: Option<&CssPseudoElement>,
53    );
54    #[cfg(feature = "IterationCompositeOperation")]
55    #[wasm_bindgen(
56        method,
57        getter,
58        js_class = "KeyframeEffect",
59        js_name = "iterationComposite"
60    )]
61    #[doc = "Getter for the `iterationComposite` field of this object."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/iterationComposite)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffect`*"]
66    pub fn iteration_composite(this: &KeyframeEffect) -> IterationCompositeOperation;
67    #[cfg(feature = "IterationCompositeOperation")]
68    #[wasm_bindgen(
69        method,
70        setter,
71        js_class = "KeyframeEffect",
72        js_name = "iterationComposite"
73    )]
74    #[doc = "Setter for the `iterationComposite` field of this object."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/iterationComposite)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffect`*"]
79    pub fn set_iteration_composite(this: &KeyframeEffect, value: IterationCompositeOperation);
80    #[cfg(feature = "CompositeOperation")]
81    #[wasm_bindgen(method, getter, js_class = "KeyframeEffect", js_name = "composite")]
82    #[doc = "Getter for the `composite` field of this object."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/composite)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffect`*"]
87    pub fn composite(this: &KeyframeEffect) -> CompositeOperation;
88    #[cfg(feature = "CompositeOperation")]
89    #[wasm_bindgen(method, setter, js_class = "KeyframeEffect", js_name = "composite")]
90    #[doc = "Setter for the `composite` field of this object."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/composite)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffect`*"]
95    pub fn set_composite(this: &KeyframeEffect, value: CompositeOperation);
96    #[cfg(feature = "Element")]
97    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
98    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
99    #[doc = ""]
100    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `Element`, `KeyframeEffect`*"]
103    pub fn new_with_opt_element_and_keyframes(
104        target: Option<&Element>,
105        keyframes: Option<&::js_sys::Object>,
106    ) -> Result<KeyframeEffect, JsValue>;
107    #[cfg(feature = "CssPseudoElement")]
108    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
109    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `CssPseudoElement`, `KeyframeEffect`*"]
114    pub fn new_with_opt_css_pseudo_element_and_keyframes(
115        target: Option<&CssPseudoElement>,
116        keyframes: Option<&::js_sys::Object>,
117    ) -> Result<KeyframeEffect, JsValue>;
118    #[cfg(feature = "Element")]
119    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
120    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
121    #[doc = ""]
122    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
123    #[doc = ""]
124    #[doc = "*This API requires the following crate features to be activated: `Element`, `KeyframeEffect`*"]
125    pub fn new_with_opt_element_and_keyframes_and_f64(
126        target: Option<&Element>,
127        keyframes: Option<&::js_sys::Object>,
128        options: f64,
129    ) -> Result<KeyframeEffect, JsValue>;
130    #[cfg(feature = "CssPseudoElement")]
131    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
132    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
133    #[doc = ""]
134    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
135    #[doc = ""]
136    #[doc = "*This API requires the following crate features to be activated: `CssPseudoElement`, `KeyframeEffect`*"]
137    pub fn new_with_opt_css_pseudo_element_and_keyframes_and_f64(
138        target: Option<&CssPseudoElement>,
139        keyframes: Option<&::js_sys::Object>,
140        options: f64,
141    ) -> Result<KeyframeEffect, JsValue>;
142    #[cfg(all(feature = "Element", feature = "KeyframeEffectOptions",))]
143    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
144    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
145    #[doc = ""]
146    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
147    #[doc = ""]
148    #[doc = "*This API requires the following crate features to be activated: `Element`, `KeyframeEffect`, `KeyframeEffectOptions`*"]
149    pub fn new_with_opt_element_and_keyframes_and_keyframe_effect_options(
150        target: Option<&Element>,
151        keyframes: Option<&::js_sys::Object>,
152        options: &KeyframeEffectOptions,
153    ) -> Result<KeyframeEffect, JsValue>;
154    #[cfg(all(feature = "CssPseudoElement", feature = "KeyframeEffectOptions",))]
155    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
156    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
157    #[doc = ""]
158    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
159    #[doc = ""]
160    #[doc = "*This API requires the following crate features to be activated: `CssPseudoElement`, `KeyframeEffect`, `KeyframeEffectOptions`*"]
161    pub fn new_with_opt_css_pseudo_element_and_keyframes_and_keyframe_effect_options(
162        target: Option<&CssPseudoElement>,
163        keyframes: Option<&::js_sys::Object>,
164        options: &KeyframeEffectOptions,
165    ) -> Result<KeyframeEffect, JsValue>;
166    #[wasm_bindgen(catch, constructor, js_class = "KeyframeEffect")]
167    #[doc = "The `new KeyframeEffect(..)` constructor, creating a new instance of `KeyframeEffect`."]
168    #[doc = ""]
169    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect)"]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffect`*"]
172    pub fn new_with_source(source: &KeyframeEffect) -> Result<KeyframeEffect, JsValue>;
173    #[wasm_bindgen(catch, method, js_class = "KeyframeEffect", js_name = "getKeyframes")]
174    #[doc = "The `getKeyframes()` method."]
175    #[doc = ""]
176    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/getKeyframes)"]
177    #[doc = ""]
178    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffect`*"]
179    pub fn get_keyframes(this: &KeyframeEffect) -> Result<::js_sys::Array, JsValue>;
180    #[wasm_bindgen(catch, method, js_class = "KeyframeEffect", js_name = "setKeyframes")]
181    #[doc = "The `setKeyframes()` method."]
182    #[doc = ""]
183    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/setKeyframes)"]
184    #[doc = ""]
185    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffect`*"]
186    pub fn set_keyframes(
187        this: &KeyframeEffect,
188        keyframes: Option<&::js_sys::Object>,
189    ) -> Result<(), JsValue>;
190}