#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = FetchEventInit)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `FetchEventInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
pub type FetchEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &FetchEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &FetchEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &FetchEventInit, val: bool);
#[wasm_bindgen(method, setter = "clientId")]
fn client_id_shim(this: &FetchEventInit, val: Option<&str>);
#[wasm_bindgen(method, setter = "isReload")]
fn is_reload_shim(this: &FetchEventInit, val: bool);
#[cfg(feature = "Request")]
#[wasm_bindgen(method, setter = "request")]
fn request_shim(this: &FetchEventInit, val: &Request);
}
impl FetchEventInit {
#[cfg(feature = "Request")]
#[doc = "Construct a new `FetchEventInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"]
pub fn new(request: &Request) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.request(request);
ret
}
#[doc = "Change the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
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: `FetchEventInit`*"]
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: `FetchEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
self.composed_shim(val);
self
}
#[doc = "Change the `clientId` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
pub fn client_id(&mut self, val: Option<&str>) -> &mut Self {
self.client_id_shim(val);
self
}
#[doc = "Change the `isReload` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
pub fn is_reload(&mut self, val: bool) -> &mut Self {
self.is_reload_shim(val);
self
}
#[cfg(feature = "Request")]
#[doc = "Change the `request` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"]
pub fn request(&mut self, val: &Request) -> &mut Self {
self.request_shim(val);
self
}
}