pub(crate) trait CspReporting {
// Required methods
fn is_js_evaluation_allowed(
&self,
cx: &mut JSContext,
global: &GlobalScope,
source: &str,
) -> bool;
fn is_wasm_evaluation_allowed(
&self,
cx: &mut JSContext,
global: &GlobalScope,
) -> bool;
fn should_navigation_request_be_blocked(
&self,
cx: &mut JSContext,
global: &GlobalScope,
load_data: &mut LoadData,
element: Option<&Element>,
) -> bool;
fn should_navigation_response_to_navigation_request_be_blocked(
&self,
cx: &mut JSContext,
window: &Window,
url: Url,
self_origin: &Origin,
) -> bool;
fn should_elements_inline_type_behavior_be_blocked(
&self,
cx: &mut JSContext,
global: &GlobalScope,
el: &Element,
type_: InlineCheckType,
source: &str,
current_line: u32,
) -> bool;
fn is_trusted_type_policy_creation_allowed(
&self,
cx: &mut JSContext,
global: &GlobalScope,
policy_name: &str,
created_policy_names: &[&str],
) -> bool;
fn does_sink_type_require_trusted_types(
&self,
sink_group: &str,
include_report_only_policies: bool,
) -> bool;
fn should_sink_type_mismatch_violation_be_blocked_by_csp(
&self,
cx: &mut JSContext,
global: &GlobalScope,
sink: &str,
sink_group: &str,
source: &str,
) -> bool;
fn is_base_allowed_for_document(
&self,
cx: &mut JSContext,
global: &GlobalScope,
base: &Url,
self_origin: &Origin,
) -> bool;
fn concatenate(self, new_csp_list: Option<CspList>) -> Option<CspList>;
}Required Methods§
fn is_js_evaluation_allowed( &self, cx: &mut JSContext, global: &GlobalScope, source: &str, ) -> bool
fn is_wasm_evaluation_allowed( &self, cx: &mut JSContext, global: &GlobalScope, ) -> bool
fn should_elements_inline_type_behavior_be_blocked( &self, cx: &mut JSContext, global: &GlobalScope, el: &Element, type_: InlineCheckType, source: &str, current_line: u32, ) -> bool
fn is_trusted_type_policy_creation_allowed( &self, cx: &mut JSContext, global: &GlobalScope, policy_name: &str, created_policy_names: &[&str], ) -> bool
fn does_sink_type_require_trusted_types( &self, sink_group: &str, include_report_only_policies: bool, ) -> bool
fn should_sink_type_mismatch_violation_be_blocked_by_csp( &self, cx: &mut JSContext, global: &GlobalScope, sink: &str, sink_group: &str, source: &str, ) -> bool
fn is_base_allowed_for_document( &self, cx: &mut JSContext, global: &GlobalScope, base: &Url, self_origin: &Origin, ) -> bool
fn concatenate(self, new_csp_list: Option<CspList>) -> Option<CspList>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".