summaryrefslogtreecommitdiffstats
path: root/vendor/web-sys/src/features/gen_Csp.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/web-sys/src/features/gen_Csp.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/web-sys/src/features/gen_Csp.rs')
-rw-r--r--vendor/web-sys/src/features/gen_Csp.rs401
1 files changed, 401 insertions, 0 deletions
diff --git a/vendor/web-sys/src/features/gen_Csp.rs b/vendor/web-sys/src/features/gen_Csp.rs
new file mode 100644
index 000000000..0fbea97c9
--- /dev/null
+++ b/vendor/web-sys/src/features/gen_Csp.rs
@@ -0,0 +1,401 @@
+#![allow(unused_imports)]
+use super::*;
+use wasm_bindgen::prelude::*;
+#[wasm_bindgen]
+extern "C" {
+ # [wasm_bindgen (extends = :: js_sys :: Object , js_name = CSP)]
+ #[derive(Debug, Clone, PartialEq, Eq)]
+ #[doc = "The `Csp` dictionary."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub type Csp;
+}
+impl Csp {
+ #[doc = "Construct a new `Csp`."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn new() -> Self {
+ #[allow(unused_mut)]
+ let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
+ ret
+ }
+ #[doc = "Change the `base-uri` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn base_uri(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("base-uri"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `block-all-mixed-content` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn block_all_mixed_content(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("block-all-mixed-content"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `child-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn child_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("child-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `connect-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn connect_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("connect-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `default-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn default_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("default-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `font-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn font_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("font-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `form-action` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn form_action(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("form-action"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `frame-ancestors` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn frame_ancestors(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("frame-ancestors"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `frame-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn frame_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("frame-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `img-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn img_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("img-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `manifest-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn manifest_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("manifest-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `media-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn media_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("media-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `object-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn object_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("object-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `referrer` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn referrer(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("referrer"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `report-only` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn report_only(&mut self, val: bool) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("report-only"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `report-uri` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn report_uri(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("report-uri"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `require-sri-for` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn require_sri_for(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("require-sri-for"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `sandbox` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn sandbox(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("sandbox"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `script-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn script_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("script-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `style-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn style_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("style-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `upgrade-insecure-requests` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn upgrade_insecure_requests(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("upgrade-insecure-requests"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `worker-src` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `Csp`*"]
+ pub fn worker_src(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("worker-src"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+}
+impl Default for Csp {
+ fn default() -> Self {
+ Self::new()
+ }
+}