web_sys/features/
gen_FontFaceSet.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "FontFaceSet",
11 typescript_type = "FontFaceSet"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `FontFaceSet` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
19 pub type FontFaceSet;
20 #[wasm_bindgen(method, getter, js_class = "FontFaceSet", js_name = "size")]
21 #[doc = "Getter for the `size` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/size)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
26 pub fn size(this: &FontFaceSet) -> u32;
27 #[wasm_bindgen(method, getter, js_class = "FontFaceSet", js_name = "onloading")]
28 #[doc = "Getter for the `onloading` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/onloading)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
33 pub fn onloading(this: &FontFaceSet) -> Option<::js_sys::Function>;
34 #[wasm_bindgen(method, setter, js_class = "FontFaceSet", js_name = "onloading")]
35 #[doc = "Setter for the `onloading` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/onloading)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
40 pub fn set_onloading(this: &FontFaceSet, value: Option<&::js_sys::Function>);
41 #[wasm_bindgen(method, getter, js_class = "FontFaceSet", js_name = "onloadingdone")]
42 #[doc = "Getter for the `onloadingdone` field of this object."]
43 #[doc = ""]
44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/onloadingdone)"]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
47 pub fn onloadingdone(this: &FontFaceSet) -> Option<::js_sys::Function>;
48 #[wasm_bindgen(method, setter, js_class = "FontFaceSet", js_name = "onloadingdone")]
49 #[doc = "Setter for the `onloadingdone` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/onloadingdone)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
54 pub fn set_onloadingdone(this: &FontFaceSet, value: Option<&::js_sys::Function>);
55 #[wasm_bindgen(method, getter, js_class = "FontFaceSet", js_name = "onloadingerror")]
56 #[doc = "Getter for the `onloadingerror` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/onloadingerror)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
61 pub fn onloadingerror(this: &FontFaceSet) -> Option<::js_sys::Function>;
62 #[wasm_bindgen(method, setter, js_class = "FontFaceSet", js_name = "onloadingerror")]
63 #[doc = "Setter for the `onloadingerror` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/onloadingerror)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
68 pub fn set_onloadingerror(this: &FontFaceSet, value: Option<&::js_sys::Function>);
69 #[wasm_bindgen(catch, method, getter, js_class = "FontFaceSet", js_name = "ready")]
70 #[doc = "Getter for the `ready` field of this object."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/ready)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
75 pub fn ready(this: &FontFaceSet) -> Result<::js_sys::Promise, JsValue>;
76 #[cfg(feature = "FontFaceSetLoadStatus")]
77 #[wasm_bindgen(method, getter, js_class = "FontFaceSet", js_name = "status")]
78 #[doc = "Getter for the `status` field of this object."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/status)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`, `FontFaceSetLoadStatus`*"]
83 pub fn status(this: &FontFaceSet) -> FontFaceSetLoadStatus;
84 #[cfg(feature = "FontFace")]
85 #[wasm_bindgen(catch, method, js_class = "FontFaceSet")]
86 #[doc = "The `add()` method."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/add)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceSet`*"]
91 pub fn add(this: &FontFaceSet, font: &FontFace) -> Result<(), JsValue>;
92 #[wasm_bindgen(catch, method, js_class = "FontFaceSet")]
93 #[doc = "The `check()` method."]
94 #[doc = ""]
95 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/check)"]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
98 pub fn check(this: &FontFaceSet, font: &str) -> Result<bool, JsValue>;
99 #[wasm_bindgen(catch, method, js_class = "FontFaceSet", js_name = "check")]
100 #[doc = "The `check()` method."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/check)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
105 pub fn check_with_text(this: &FontFaceSet, font: &str, text: &str) -> Result<bool, JsValue>;
106 #[wasm_bindgen(method, js_class = "FontFaceSet")]
107 #[doc = "The `clear()` method."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/clear)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
112 pub fn clear(this: &FontFaceSet);
113 #[cfg(feature = "FontFace")]
114 #[wasm_bindgen(method, js_class = "FontFaceSet")]
115 #[doc = "The `delete()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/delete)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceSet`*"]
120 pub fn delete(this: &FontFaceSet, font: &FontFace) -> bool;
121 #[cfg(feature = "FontFaceSetIterator")]
122 #[wasm_bindgen(method, js_class = "FontFaceSet")]
123 #[doc = "The `entries()` method."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/entries)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`, `FontFaceSetIterator`*"]
128 pub fn entries(this: &FontFaceSet) -> FontFaceSetIterator;
129 #[wasm_bindgen(catch, method, js_class = "FontFaceSet", js_name = "forEach")]
130 #[doc = "The `forEach()` method."]
131 #[doc = ""]
132 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/forEach)"]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
135 pub fn for_each(this: &FontFaceSet, cb: &::js_sys::Function) -> Result<(), JsValue>;
136 #[wasm_bindgen(catch, method, js_class = "FontFaceSet", js_name = "forEach")]
137 #[doc = "The `forEach()` method."]
138 #[doc = ""]
139 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/forEach)"]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
142 pub fn for_each_with_this_arg(
143 this: &FontFaceSet,
144 cb: &::js_sys::Function,
145 this_arg: &::wasm_bindgen::JsValue,
146 ) -> Result<(), JsValue>;
147 #[cfg(feature = "FontFace")]
148 #[wasm_bindgen(method, js_class = "FontFaceSet")]
149 #[doc = "The `has()` method."]
150 #[doc = ""]
151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/has)"]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceSet`*"]
154 pub fn has(this: &FontFaceSet, font: &FontFace) -> bool;
155 #[wasm_bindgen(method, js_class = "FontFaceSet")]
156 #[doc = "The `load()` method."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/load)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
161 pub fn load(this: &FontFaceSet, font: &str) -> ::js_sys::Promise;
162 #[wasm_bindgen(method, js_class = "FontFaceSet", js_name = "load")]
163 #[doc = "The `load()` method."]
164 #[doc = ""]
165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/load)"]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`*"]
168 pub fn load_with_text(this: &FontFaceSet, font: &str, text: &str) -> ::js_sys::Promise;
169 #[cfg(feature = "FontFaceSetIterator")]
170 #[wasm_bindgen(method, js_class = "FontFaceSet")]
171 #[doc = "The `values()` method."]
172 #[doc = ""]
173 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/values)"]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `FontFaceSet`, `FontFaceSetIterator`*"]
176 pub fn values(this: &FontFaceSet) -> FontFaceSetIterator;
177}