1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FakePluginTagInit)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `FakePluginTagInit` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] 11 pub type FakePluginTagInit; 12 } 13 impl FakePluginTagInit { 14 #[doc = "Construct a new `FakePluginTagInit`."] 15 #[doc = ""] 16 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] new(handler_uri: &str, mime_entries: &::wasm_bindgen::JsValue) -> Self17 pub fn new(handler_uri: &str, mime_entries: &::wasm_bindgen::JsValue) -> Self { 18 #[allow(unused_mut)] 19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 20 ret.handler_uri(handler_uri); 21 ret.mime_entries(mime_entries); 22 ret 23 } 24 #[doc = "Change the `description` field of this object."] 25 #[doc = ""] 26 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] description(&mut self, val: &str) -> &mut Self27 pub fn description(&mut self, val: &str) -> &mut Self { 28 use wasm_bindgen::JsValue; 29 let r = ::js_sys::Reflect::set( 30 self.as_ref(), 31 &JsValue::from("description"), 32 &JsValue::from(val), 33 ); 34 debug_assert!( 35 r.is_ok(), 36 "setting properties should never fail on our dictionary objects" 37 ); 38 let _ = r; 39 self 40 } 41 #[doc = "Change the `fileName` field of this object."] 42 #[doc = ""] 43 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] file_name(&mut self, val: &str) -> &mut Self44 pub fn file_name(&mut self, val: &str) -> &mut Self { 45 use wasm_bindgen::JsValue; 46 let r = ::js_sys::Reflect::set( 47 self.as_ref(), 48 &JsValue::from("fileName"), 49 &JsValue::from(val), 50 ); 51 debug_assert!( 52 r.is_ok(), 53 "setting properties should never fail on our dictionary objects" 54 ); 55 let _ = r; 56 self 57 } 58 #[doc = "Change the `fullPath` field of this object."] 59 #[doc = ""] 60 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] full_path(&mut self, val: &str) -> &mut Self61 pub fn full_path(&mut self, val: &str) -> &mut Self { 62 use wasm_bindgen::JsValue; 63 let r = ::js_sys::Reflect::set( 64 self.as_ref(), 65 &JsValue::from("fullPath"), 66 &JsValue::from(val), 67 ); 68 debug_assert!( 69 r.is_ok(), 70 "setting properties should never fail on our dictionary objects" 71 ); 72 let _ = r; 73 self 74 } 75 #[doc = "Change the `handlerURI` field of this object."] 76 #[doc = ""] 77 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] handler_uri(&mut self, val: &str) -> &mut Self78 pub fn handler_uri(&mut self, val: &str) -> &mut Self { 79 use wasm_bindgen::JsValue; 80 let r = ::js_sys::Reflect::set( 81 self.as_ref(), 82 &JsValue::from("handlerURI"), 83 &JsValue::from(val), 84 ); 85 debug_assert!( 86 r.is_ok(), 87 "setting properties should never fail on our dictionary objects" 88 ); 89 let _ = r; 90 self 91 } 92 #[doc = "Change the `mimeEntries` field of this object."] 93 #[doc = ""] 94 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] mime_entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self95 pub fn mime_entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 96 use wasm_bindgen::JsValue; 97 let r = ::js_sys::Reflect::set( 98 self.as_ref(), 99 &JsValue::from("mimeEntries"), 100 &JsValue::from(val), 101 ); 102 debug_assert!( 103 r.is_ok(), 104 "setting properties should never fail on our dictionary objects" 105 ); 106 let _ = r; 107 self 108 } 109 #[doc = "Change the `name` field of this object."] 110 #[doc = ""] 111 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] name(&mut self, val: &str) -> &mut Self112 pub fn name(&mut self, val: &str) -> &mut Self { 113 use wasm_bindgen::JsValue; 114 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val)); 115 debug_assert!( 116 r.is_ok(), 117 "setting properties should never fail on our dictionary objects" 118 ); 119 let _ = r; 120 self 121 } 122 #[doc = "Change the `niceName` field of this object."] 123 #[doc = ""] 124 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] nice_name(&mut self, val: &str) -> &mut Self125 pub fn nice_name(&mut self, val: &str) -> &mut Self { 126 use wasm_bindgen::JsValue; 127 let r = ::js_sys::Reflect::set( 128 self.as_ref(), 129 &JsValue::from("niceName"), 130 &JsValue::from(val), 131 ); 132 debug_assert!( 133 r.is_ok(), 134 "setting properties should never fail on our dictionary objects" 135 ); 136 let _ = r; 137 self 138 } 139 #[doc = "Change the `sandboxScript` field of this object."] 140 #[doc = ""] 141 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] sandbox_script(&mut self, val: &str) -> &mut Self142 pub fn sandbox_script(&mut self, val: &str) -> &mut Self { 143 use wasm_bindgen::JsValue; 144 let r = ::js_sys::Reflect::set( 145 self.as_ref(), 146 &JsValue::from("sandboxScript"), 147 &JsValue::from(val), 148 ); 149 debug_assert!( 150 r.is_ok(), 151 "setting properties should never fail on our dictionary objects" 152 ); 153 let _ = r; 154 self 155 } 156 #[doc = "Change the `version` field of this object."] 157 #[doc = ""] 158 #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] version(&mut self, val: &str) -> &mut Self159 pub fn version(&mut self, val: &str) -> &mut Self { 160 use wasm_bindgen::JsValue; 161 let r = ::js_sys::Reflect::set( 162 self.as_ref(), 163 &JsValue::from("version"), 164 &JsValue::from(val), 165 ); 166 debug_assert!( 167 r.is_ok(), 168 "setting properties should never fail on our dictionary objects" 169 ); 170 let _ = r; 171 self 172 } 173 } 174