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