web_sys/features/
gen_SecurityPolicyViolationEventInit.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = SecurityPolicyViolationEventInit)]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `SecurityPolicyViolationEventInit` dictionary."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    pub type SecurityPolicyViolationEventInit;
    #[doc = "Get the `bubbles` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "bubbles")]
    pub fn get_bubbles(this: &SecurityPolicyViolationEventInit) -> Option<bool>;
    #[doc = "Change the `bubbles` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "bubbles")]
    pub fn set_bubbles(this: &SecurityPolicyViolationEventInit, val: bool);
    #[doc = "Get the `cancelable` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "cancelable")]
    pub fn get_cancelable(this: &SecurityPolicyViolationEventInit) -> Option<bool>;
    #[doc = "Change the `cancelable` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "cancelable")]
    pub fn set_cancelable(this: &SecurityPolicyViolationEventInit, val: bool);
    #[doc = "Get the `composed` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "composed")]
    pub fn get_composed(this: &SecurityPolicyViolationEventInit) -> Option<bool>;
    #[doc = "Change the `composed` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "composed")]
    pub fn set_composed(this: &SecurityPolicyViolationEventInit, val: bool);
    #[doc = "Get the `blockedURI` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "blockedURI")]
    pub fn get_blocked_uri(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<::alloc::string::String>;
    #[doc = "Change the `blockedURI` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "blockedURI")]
    pub fn set_blocked_uri(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `columnNumber` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "columnNumber")]
    pub fn get_column_number(this: &SecurityPolicyViolationEventInit) -> Option<i32>;
    #[doc = "Change the `columnNumber` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "columnNumber")]
    pub fn set_column_number(this: &SecurityPolicyViolationEventInit, val: i32);
    #[cfg(feature = "SecurityPolicyViolationEventDisposition")]
    #[doc = "Get the `disposition` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "disposition")]
    pub fn get_disposition(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<SecurityPolicyViolationEventDisposition>;
    #[cfg(feature = "SecurityPolicyViolationEventDisposition")]
    #[doc = "Change the `disposition` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "disposition")]
    pub fn set_disposition(
        this: &SecurityPolicyViolationEventInit,
        val: SecurityPolicyViolationEventDisposition,
    );
    #[doc = "Get the `documentURI` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "documentURI")]
    pub fn get_document_uri(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<::alloc::string::String>;
    #[doc = "Change the `documentURI` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "documentURI")]
    pub fn set_document_uri(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `effectiveDirective` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "effectiveDirective")]
    pub fn get_effective_directive(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<::alloc::string::String>;
    #[doc = "Change the `effectiveDirective` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "effectiveDirective")]
    pub fn set_effective_directive(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `lineNumber` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "lineNumber")]
    pub fn get_line_number(this: &SecurityPolicyViolationEventInit) -> Option<i32>;
    #[doc = "Change the `lineNumber` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "lineNumber")]
    pub fn set_line_number(this: &SecurityPolicyViolationEventInit, val: i32);
    #[doc = "Get the `originalPolicy` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "originalPolicy")]
    pub fn get_original_policy(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<::alloc::string::String>;
    #[doc = "Change the `originalPolicy` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "originalPolicy")]
    pub fn set_original_policy(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `referrer` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "referrer")]
    pub fn get_referrer(this: &SecurityPolicyViolationEventInit)
        -> Option<::alloc::string::String>;
    #[doc = "Change the `referrer` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "referrer")]
    pub fn set_referrer(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `sample` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "sample")]
    pub fn get_sample(this: &SecurityPolicyViolationEventInit) -> Option<::alloc::string::String>;
    #[doc = "Change the `sample` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "sample")]
    pub fn set_sample(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `sourceFile` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "sourceFile")]
    pub fn get_source_file(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<::alloc::string::String>;
    #[doc = "Change the `sourceFile` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "sourceFile")]
    pub fn set_source_file(this: &SecurityPolicyViolationEventInit, val: &str);
    #[doc = "Get the `statusCode` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "statusCode")]
    pub fn get_status_code(this: &SecurityPolicyViolationEventInit) -> Option<u16>;
    #[doc = "Change the `statusCode` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "statusCode")]
    pub fn set_status_code(this: &SecurityPolicyViolationEventInit, val: u16);
    #[doc = "Get the `violatedDirective` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, getter = "violatedDirective")]
    pub fn get_violated_directive(
        this: &SecurityPolicyViolationEventInit,
    ) -> Option<::alloc::string::String>;
    #[doc = "Change the `violatedDirective` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    #[wasm_bindgen(method, setter = "violatedDirective")]
    pub fn set_violated_directive(this: &SecurityPolicyViolationEventInit, val: &str);
}
impl SecurityPolicyViolationEventInit {
    #[doc = "Construct a new `SecurityPolicyViolationEventInit`."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"]
    pub fn new() -> Self {
        #[allow(unused_mut)]
        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
        ret
    }
    #[deprecated = "Use `set_bubbles()` instead."]
    pub fn bubbles(&mut self, val: bool) -> &mut Self {
        self.set_bubbles(val);
        self
    }
    #[deprecated = "Use `set_cancelable()` instead."]
    pub fn cancelable(&mut self, val: bool) -> &mut Self {
        self.set_cancelable(val);
        self
    }
    #[deprecated = "Use `set_composed()` instead."]
    pub fn composed(&mut self, val: bool) -> &mut Self {
        self.set_composed(val);
        self
    }
    #[deprecated = "Use `set_blocked_uri()` instead."]
    pub fn blocked_uri(&mut self, val: &str) -> &mut Self {
        self.set_blocked_uri(val);
        self
    }
    #[deprecated = "Use `set_column_number()` instead."]
    pub fn column_number(&mut self, val: i32) -> &mut Self {
        self.set_column_number(val);
        self
    }
    #[cfg(feature = "SecurityPolicyViolationEventDisposition")]
    #[deprecated = "Use `set_disposition()` instead."]
    pub fn disposition(&mut self, val: SecurityPolicyViolationEventDisposition) -> &mut Self {
        self.set_disposition(val);
        self
    }
    #[deprecated = "Use `set_document_uri()` instead."]
    pub fn document_uri(&mut self, val: &str) -> &mut Self {
        self.set_document_uri(val);
        self
    }
    #[deprecated = "Use `set_effective_directive()` instead."]
    pub fn effective_directive(&mut self, val: &str) -> &mut Self {
        self.set_effective_directive(val);
        self
    }
    #[deprecated = "Use `set_line_number()` instead."]
    pub fn line_number(&mut self, val: i32) -> &mut Self {
        self.set_line_number(val);
        self
    }
    #[deprecated = "Use `set_original_policy()` instead."]
    pub fn original_policy(&mut self, val: &str) -> &mut Self {
        self.set_original_policy(val);
        self
    }
    #[deprecated = "Use `set_referrer()` instead."]
    pub fn referrer(&mut self, val: &str) -> &mut Self {
        self.set_referrer(val);
        self
    }
    #[deprecated = "Use `set_sample()` instead."]
    pub fn sample(&mut self, val: &str) -> &mut Self {
        self.set_sample(val);
        self
    }
    #[deprecated = "Use `set_source_file()` instead."]
    pub fn source_file(&mut self, val: &str) -> &mut Self {
        self.set_source_file(val);
        self
    }
    #[deprecated = "Use `set_status_code()` instead."]
    pub fn status_code(&mut self, val: u16) -> &mut Self {
        self.set_status_code(val);
        self
    }
    #[deprecated = "Use `set_violated_directive()` instead."]
    pub fn violated_directive(&mut self, val: &str) -> &mut Self {
        self.set_violated_directive(val);
        self
    }
}
impl Default for SecurityPolicyViolationEventInit {
    fn default() -> Self {
        Self::new()
    }
}