Skip to main content

should_block_resource

Function should_block_resource 

Source
pub fn should_block_resource(
    resource_type: &str,
    disable_resources: bool,
) -> bool
Expand description

Returns true if the given resource type should be blocked when resource blocking is enabled.

The check is skipped entirely when disable_resources is false. When enabled, it matches resource_type against the list in [constants::EXTRA_RESOURCES], which includes types like "font", "image", "stylesheet", and "media".