web_sys/features/
gen_SpeechGrammarList.rs1#![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 = "SpeechGrammarList",
10 typescript_type = "SpeechGrammarList"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `SpeechGrammarList` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
18 pub type SpeechGrammarList;
19 #[wasm_bindgen(method, getter, js_class = "SpeechGrammarList", js_name = "length")]
20 #[doc = "Getter for the `length` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/length)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
25 pub fn length(this: &SpeechGrammarList) -> u32;
26 #[wasm_bindgen(catch, constructor, js_class = "SpeechGrammarList")]
27 #[doc = "The `new SpeechGrammarList(..)` constructor, creating a new instance of `SpeechGrammarList`."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/SpeechGrammarList)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
32 pub fn new() -> Result<SpeechGrammarList, JsValue>;
33 #[wasm_bindgen(
34 catch,
35 method,
36 js_class = "SpeechGrammarList",
37 js_name = "addFromString"
38 )]
39 #[doc = "The `addFromString()` method."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/addFromString)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
44 pub fn add_from_string(this: &SpeechGrammarList, string: &str) -> Result<(), JsValue>;
45 #[wasm_bindgen(
46 catch,
47 method,
48 js_class = "SpeechGrammarList",
49 js_name = "addFromString"
50 )]
51 #[doc = "The `addFromString()` method."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/addFromString)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
56 pub fn add_from_string_with_weight(
57 this: &SpeechGrammarList,
58 string: &str,
59 weight: f32,
60 ) -> Result<(), JsValue>;
61 #[wasm_bindgen(catch, method, js_class = "SpeechGrammarList", js_name = "addFromURI")]
62 #[doc = "The `addFromURI()` method."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/addFromURI)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
67 pub fn add_from_uri(this: &SpeechGrammarList, src: &str) -> Result<(), JsValue>;
68 #[wasm_bindgen(catch, method, js_class = "SpeechGrammarList", js_name = "addFromURI")]
69 #[doc = "The `addFromURI()` method."]
70 #[doc = ""]
71 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/addFromURI)"]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammarList`*"]
74 pub fn add_from_uri_with_weight(
75 this: &SpeechGrammarList,
76 src: &str,
77 weight: f32,
78 ) -> Result<(), JsValue>;
79 #[cfg(feature = "SpeechGrammar")]
80 #[wasm_bindgen(catch, method, js_class = "SpeechGrammarList")]
81 #[doc = "The `item()` method."]
82 #[doc = ""]
83 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList/item)"]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammar`, `SpeechGrammarList`*"]
86 pub fn item(this: &SpeechGrammarList, index: u32) -> Result<SpeechGrammar, JsValue>;
87 #[cfg(feature = "SpeechGrammar")]
88 #[wasm_bindgen(catch, method, js_class = "SpeechGrammarList", indexing_getter)]
89 #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
90 #[doc = ""]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `SpeechGrammar`, `SpeechGrammarList`*"]
93 pub fn get(this: &SpeechGrammarList, index: u32) -> Result<SpeechGrammar, JsValue>;
94}