web_sys/features/
gen_SecurityPolicyViolationEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "Event",
9 extends = "::js_sys::Object",
10 js_name = "SecurityPolicyViolationEvent",
11 typescript_type = "SecurityPolicyViolationEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `SecurityPolicyViolationEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
19 pub type SecurityPolicyViolationEvent;
20 #[wasm_bindgen(
21 method,
22 getter,
23 js_class = "SecurityPolicyViolationEvent",
24 js_name = "documentURI"
25 )]
26 #[doc = "Getter for the `documentURI` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/documentURI)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
31 pub fn document_uri(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
32 #[wasm_bindgen(
33 method,
34 getter,
35 js_class = "SecurityPolicyViolationEvent",
36 js_name = "referrer"
37 )]
38 #[doc = "Getter for the `referrer` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/referrer)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
43 pub fn referrer(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
44 #[wasm_bindgen(
45 method,
46 getter,
47 js_class = "SecurityPolicyViolationEvent",
48 js_name = "blockedURI"
49 )]
50 #[doc = "Getter for the `blockedURI` field of this object."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/blockedURI)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
55 pub fn blocked_uri(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
56 #[wasm_bindgen(
57 method,
58 getter,
59 js_class = "SecurityPolicyViolationEvent",
60 js_name = "violatedDirective"
61 )]
62 #[doc = "Getter for the `violatedDirective` field of this object."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/violatedDirective)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
67 pub fn violated_directive(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
68 #[wasm_bindgen(
69 method,
70 getter,
71 js_class = "SecurityPolicyViolationEvent",
72 js_name = "effectiveDirective"
73 )]
74 #[doc = "Getter for the `effectiveDirective` field of this object."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/effectiveDirective)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
79 pub fn effective_directive(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
80 #[wasm_bindgen(
81 method,
82 getter,
83 js_class = "SecurityPolicyViolationEvent",
84 js_name = "originalPolicy"
85 )]
86 #[doc = "Getter for the `originalPolicy` field of this object."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/originalPolicy)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
91 pub fn original_policy(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
92 #[wasm_bindgen(
93 method,
94 getter,
95 js_class = "SecurityPolicyViolationEvent",
96 js_name = "sourceFile"
97 )]
98 #[doc = "Getter for the `sourceFile` field of this object."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/sourceFile)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
103 pub fn source_file(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
104 #[wasm_bindgen(
105 method,
106 getter,
107 js_class = "SecurityPolicyViolationEvent",
108 js_name = "sample"
109 )]
110 #[doc = "Getter for the `sample` field of this object."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/sample)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
115 pub fn sample(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
116 #[cfg(feature = "SecurityPolicyViolationEventDisposition")]
117 #[wasm_bindgen(
118 method,
119 getter,
120 js_class = "SecurityPolicyViolationEvent",
121 js_name = "disposition"
122 )]
123 #[doc = "Getter for the `disposition` field of this object."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/disposition)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`, `SecurityPolicyViolationEventDisposition`*"]
128 pub fn disposition(
129 this: &SecurityPolicyViolationEvent,
130 ) -> SecurityPolicyViolationEventDisposition;
131 #[wasm_bindgen(
132 method,
133 getter,
134 js_class = "SecurityPolicyViolationEvent",
135 js_name = "statusCode"
136 )]
137 #[doc = "Getter for the `statusCode` field of this object."]
138 #[doc = ""]
139 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/statusCode)"]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
142 pub fn status_code(this: &SecurityPolicyViolationEvent) -> u16;
143 #[wasm_bindgen(
144 method,
145 getter,
146 js_class = "SecurityPolicyViolationEvent",
147 js_name = "lineNumber"
148 )]
149 #[doc = "Getter for the `lineNumber` field of this object."]
150 #[doc = ""]
151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/lineNumber)"]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
154 pub fn line_number(this: &SecurityPolicyViolationEvent) -> i32;
155 #[wasm_bindgen(
156 method,
157 getter,
158 js_class = "SecurityPolicyViolationEvent",
159 js_name = "columnNumber"
160 )]
161 #[doc = "Getter for the `columnNumber` field of this object."]
162 #[doc = ""]
163 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/columnNumber)"]
164 #[doc = ""]
165 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
166 pub fn column_number(this: &SecurityPolicyViolationEvent) -> i32;
167 #[wasm_bindgen(catch, constructor, js_class = "SecurityPolicyViolationEvent")]
168 #[doc = "The `new SecurityPolicyViolationEvent(..)` constructor, creating a new instance of `SecurityPolicyViolationEvent`."]
169 #[doc = ""]
170 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/SecurityPolicyViolationEvent)"]
171 #[doc = ""]
172 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
173 pub fn new(type_: &str) -> Result<SecurityPolicyViolationEvent, JsValue>;
174 #[cfg(feature = "SecurityPolicyViolationEventInit")]
175 #[wasm_bindgen(catch, constructor, js_class = "SecurityPolicyViolationEvent")]
176 #[doc = "The `new SecurityPolicyViolationEvent(..)` constructor, creating a new instance of `SecurityPolicyViolationEvent`."]
177 #[doc = ""]
178 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/SecurityPolicyViolationEvent)"]
179 #[doc = ""]
180 #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`, `SecurityPolicyViolationEventInit`*"]
181 pub fn new_with_event_init_dict(
182 type_: &str,
183 event_init_dict: &SecurityPolicyViolationEventInit,
184 ) -> Result<SecurityPolicyViolationEvent, JsValue>;
185}