web_sys/features/
gen_SecurityPolicyViolationEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = SecurityPolicyViolationEvent , typescript_type = "SecurityPolicyViolationEvent")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `SecurityPolicyViolationEvent` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
14    pub type SecurityPolicyViolationEvent;
15    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = documentURI)]
16    #[doc = "Getter for the `documentURI` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/documentURI)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
21    pub fn document_uri(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
22    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = referrer)]
23    #[doc = "Getter for the `referrer` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/referrer)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
28    pub fn referrer(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
29    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = blockedURI)]
30    #[doc = "Getter for the `blockedURI` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/blockedURI)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
35    pub fn blocked_uri(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
36    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = violatedDirective)]
37    #[doc = "Getter for the `violatedDirective` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/violatedDirective)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
42    pub fn violated_directive(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
43    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = effectiveDirective)]
44    #[doc = "Getter for the `effectiveDirective` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/effectiveDirective)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
49    pub fn effective_directive(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
50    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = originalPolicy)]
51    #[doc = "Getter for the `originalPolicy` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/originalPolicy)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
56    pub fn original_policy(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
57    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = sourceFile)]
58    #[doc = "Getter for the `sourceFile` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/sourceFile)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
63    pub fn source_file(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
64    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = sample)]
65    #[doc = "Getter for the `sample` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/sample)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
70    pub fn sample(this: &SecurityPolicyViolationEvent) -> ::alloc::string::String;
71    #[cfg(feature = "SecurityPolicyViolationEventDisposition")]
72    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = disposition)]
73    #[doc = "Getter for the `disposition` field of this object."]
74    #[doc = ""]
75    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/disposition)"]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`, `SecurityPolicyViolationEventDisposition`*"]
78    pub fn disposition(
79        this: &SecurityPolicyViolationEvent,
80    ) -> SecurityPolicyViolationEventDisposition;
81    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = statusCode)]
82    #[doc = "Getter for the `statusCode` field of this object."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/statusCode)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
87    pub fn status_code(this: &SecurityPolicyViolationEvent) -> u16;
88    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = lineNumber)]
89    #[doc = "Getter for the `lineNumber` field of this object."]
90    #[doc = ""]
91    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/lineNumber)"]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
94    pub fn line_number(this: &SecurityPolicyViolationEvent) -> i32;
95    # [wasm_bindgen (structural , method , getter , js_class = "SecurityPolicyViolationEvent" , js_name = columnNumber)]
96    #[doc = "Getter for the `columnNumber` field of this object."]
97    #[doc = ""]
98    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/columnNumber)"]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
101    pub fn column_number(this: &SecurityPolicyViolationEvent) -> i32;
102    #[wasm_bindgen(catch, constructor, js_class = "SecurityPolicyViolationEvent")]
103    #[doc = "The `new SecurityPolicyViolationEvent(..)` constructor, creating a new instance of `SecurityPolicyViolationEvent`."]
104    #[doc = ""]
105    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/SecurityPolicyViolationEvent)"]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`*"]
108    pub fn new(type_: &str) -> Result<SecurityPolicyViolationEvent, JsValue>;
109    #[cfg(feature = "SecurityPolicyViolationEventInit")]
110    #[wasm_bindgen(catch, constructor, js_class = "SecurityPolicyViolationEvent")]
111    #[doc = "The `new SecurityPolicyViolationEvent(..)` constructor, creating a new instance of `SecurityPolicyViolationEvent`."]
112    #[doc = ""]
113    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent/SecurityPolicyViolationEvent)"]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEvent`, `SecurityPolicyViolationEventInit`*"]
116    pub fn new_with_event_init_dict(
117        type_: &str,
118        event_init_dict: &SecurityPolicyViolationEventInit,
119    ) -> Result<SecurityPolicyViolationEvent, JsValue>;
120}