#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = SpeechRecognitionEventInit)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `SpeechRecognitionEventInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub type SpeechRecognitionEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &SpeechRecognitionEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &SpeechRecognitionEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &SpeechRecognitionEventInit, val: bool);
#[cfg(feature = "Document")]
#[wasm_bindgen(method, setter = "emma")]
fn emma_shim(this: &SpeechRecognitionEventInit, val: Option<&Document>);
#[wasm_bindgen(method, setter = "interpretation")]
fn interpretation_shim(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "resultIndex")]
fn result_index_shim(this: &SpeechRecognitionEventInit, val: u32);
#[cfg(feature = "SpeechRecognitionResultList")]
#[wasm_bindgen(method, setter = "results")]
fn results_shim(this: &SpeechRecognitionEventInit, val: Option<&SpeechRecognitionResultList>);
}
impl SpeechRecognitionEventInit {
#[doc = "Construct a new `SpeechRecognitionEventInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
self.composed_shim(val);
self
}
#[cfg(feature = "Document")]
#[doc = "Change the `emma` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"]
pub fn emma(&mut self, val: Option<&Document>) -> &mut Self {
self.emma_shim(val);
self
}
#[doc = "Change the `interpretation` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub fn interpretation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.interpretation_shim(val);
self
}
#[doc = "Change the `resultIndex` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"]
pub fn result_index(&mut self, val: u32) -> &mut Self {
self.result_index_shim(val);
self
}
#[cfg(feature = "SpeechRecognitionResultList")]
#[doc = "Change the `results` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"]
pub fn results(&mut self, val: Option<&SpeechRecognitionResultList>) -> &mut Self {
self.results_shim(val);
self
}
}
impl Default for SpeechRecognitionEventInit {
fn default() -> Self {
Self::new()
}
}