Skip to main content

web_sys/features/
gen_Highlight.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "Highlight",
11        typescript_type = "Highlight"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `Highlight` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `Highlight`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type Highlight;
23    #[cfg(web_sys_unstable_apis)]
24    #[wasm_bindgen(method, getter, js_class = "Highlight", js_name = "size")]
25    #[doc = "Getter for the `size` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/size)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `Highlight`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    pub fn size(this: &Highlight) -> u32;
34    #[cfg(web_sys_unstable_apis)]
35    #[wasm_bindgen(method, getter, js_class = "Highlight", js_name = "priority")]
36    #[doc = "Getter for the `priority` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/priority)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `Highlight`*"]
41    #[doc = ""]
42    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44    pub fn priority(this: &Highlight) -> i32;
45    #[cfg(web_sys_unstable_apis)]
46    #[wasm_bindgen(method, setter, js_class = "Highlight", js_name = "priority")]
47    #[doc = "Setter for the `priority` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/priority)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `Highlight`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    pub fn set_priority(this: &Highlight, value: i32);
56    #[cfg(web_sys_unstable_apis)]
57    #[cfg(feature = "HighlightType")]
58    #[wasm_bindgen(method, getter, js_class = "Highlight", js_name = "type")]
59    #[doc = "Getter for the `type` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/type)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightType`*"]
64    #[doc = ""]
65    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67    pub fn type_(this: &Highlight) -> HighlightType;
68    #[cfg(web_sys_unstable_apis)]
69    #[cfg(feature = "HighlightType")]
70    #[wasm_bindgen(method, setter, js_class = "Highlight", js_name = "type")]
71    #[doc = "Setter for the `type` field of this object."]
72    #[doc = ""]
73    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/type)"]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightType`*"]
76    #[doc = ""]
77    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79    pub fn set_type(this: &Highlight, value: HighlightType);
80    #[cfg(web_sys_unstable_apis)]
81    #[cfg(feature = "AbstractRange")]
82    #[wasm_bindgen(catch, constructor, variadic, js_class = "Highlight")]
83    #[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
88    #[doc = ""]
89    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91    pub fn new(initial_ranges: &[AbstractRange]) -> Result<Highlight, JsValue>;
92    #[cfg(web_sys_unstable_apis)]
93    #[cfg(feature = "AbstractRange")]
94    #[wasm_bindgen(method, js_class = "Highlight")]
95    #[doc = "The `add()` method."]
96    #[doc = ""]
97    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/add)"]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
100    #[doc = ""]
101    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
102    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
103    pub fn add(this: &Highlight, value: &AbstractRange) -> Highlight;
104    #[cfg(web_sys_unstable_apis)]
105    #[wasm_bindgen(method, js_class = "Highlight")]
106    #[doc = "The `clear()` method."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/clear)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `Highlight`*"]
111    #[doc = ""]
112    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
114    pub fn clear(this: &Highlight);
115    #[cfg(web_sys_unstable_apis)]
116    #[cfg(feature = "AbstractRange")]
117    #[wasm_bindgen(method, js_class = "Highlight")]
118    #[doc = "The `delete()` method."]
119    #[doc = ""]
120    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/delete)"]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
123    #[doc = ""]
124    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
125    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
126    pub fn delete(this: &Highlight, value: &AbstractRange) -> bool;
127    #[cfg(web_sys_unstable_apis)]
128    #[cfg(feature = "AbstractRange")]
129    #[wasm_bindgen(catch, method, js_class = "Highlight", js_name = "forEach")]
130    #[doc = "The `forEach()` method."]
131    #[doc = ""]
132    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/forEach)"]
133    #[doc = ""]
134    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
135    #[doc = ""]
136    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
138    pub fn for_each(
139        this: &Highlight,
140        callback: &::js_sys::Function<fn(AbstractRange) -> ::js_sys::Undefined>,
141    ) -> Result<(), JsValue>;
142    #[cfg(web_sys_unstable_apis)]
143    #[cfg(feature = "AbstractRange")]
144    #[wasm_bindgen(method, js_class = "Highlight")]
145    #[doc = "The `has()` method."]
146    #[doc = ""]
147    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/has)"]
148    #[doc = ""]
149    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
150    #[doc = ""]
151    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
152    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
153    pub fn has(this: &Highlight, value: &AbstractRange) -> bool;
154    #[cfg(web_sys_unstable_apis)]
155    #[cfg(feature = "AbstractRange")]
156    #[wasm_bindgen(method, js_class = "Highlight")]
157    #[doc = "The `entries()` method."]
158    #[doc = ""]
159    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/entries)"]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
162    #[doc = ""]
163    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
164    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
165    pub fn entries(
166        this: &Highlight,
167    ) -> ::js_sys::Iterator<::js_sys::ArrayTuple<(AbstractRange, AbstractRange)>>;
168    #[cfg(web_sys_unstable_apis)]
169    #[cfg(feature = "AbstractRange")]
170    #[wasm_bindgen(method, js_class = "Highlight")]
171    #[doc = "The `keys()` method."]
172    #[doc = ""]
173    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/keys)"]
174    #[doc = ""]
175    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
176    #[doc = ""]
177    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
178    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
179    pub fn keys(this: &Highlight) -> ::js_sys::Iterator<AbstractRange>;
180    #[cfg(web_sys_unstable_apis)]
181    #[cfg(feature = "AbstractRange")]
182    #[wasm_bindgen(method, js_class = "Highlight")]
183    #[doc = "The `values()` method."]
184    #[doc = ""]
185    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/values)"]
186    #[doc = ""]
187    #[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
188    #[doc = ""]
189    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
190    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
191    pub fn values(this: &Highlight) -> ::js_sys::Iterator<AbstractRange>;
192}