Trait CspReporting

Source
pub(crate) trait CspReporting {
    // Required methods
    fn is_js_evaluation_allowed(
        &self,
        global: &GlobalScope,
        source: &str,
    ) -> bool;
    fn is_wasm_evaluation_allowed(&self, global: &GlobalScope) -> bool;
    fn should_navigation_request_be_blocked(
        &self,
        global: &GlobalScope,
        load_data: &mut LoadData,
        element: Option<&Element>,
        can_gc: CanGc,
    ) -> bool;
    fn should_elements_inline_type_behavior_be_blocked(
        &self,
        global: &GlobalScope,
        el: &Element,
        type_: InlineCheckType,
        source: &str,
    ) -> bool;
    fn is_trusted_type_policy_creation_allowed(
        &self,
        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,
        global: &GlobalScope,
        sink: &str,
        sink_group: &str,
        source: &str,
    ) -> bool;
    fn concatenate(self, new_csp_list: Option<CspList>) -> Option<CspList>;
}

Required Methods§

Source

fn is_js_evaluation_allowed(&self, global: &GlobalScope, source: &str) -> bool

Source

fn is_wasm_evaluation_allowed(&self, global: &GlobalScope) -> bool

Source

fn should_navigation_request_be_blocked( &self, global: &GlobalScope, load_data: &mut LoadData, element: Option<&Element>, can_gc: CanGc, ) -> bool

Source

fn should_elements_inline_type_behavior_be_blocked( &self, global: &GlobalScope, el: &Element, type_: InlineCheckType, source: &str, ) -> bool

Source

fn is_trusted_type_policy_creation_allowed( &self, global: &GlobalScope, policy_name: &str, created_policy_names: &[&str], ) -> bool

Source

fn does_sink_type_require_trusted_types( &self, sink_group: &str, include_report_only_policies: bool, ) -> bool

Source

fn should_sink_type_mismatch_violation_be_blocked_by_csp( &self, global: &GlobalScope, sink: &str, sink_group: &str, source: &str, ) -> bool

Source

fn concatenate(self, new_csp_list: Option<CspList>) -> Option<CspList>

Implementations on Foreign Types§

Source§

impl CspReporting for Option<CspList>

Implementors§