Skip to main content

enforce_switch

Function enforce_switch 

Source
pub fn enforce_switch(
    label: &str,
    decision: WebviewDecision,
    switch: Option<&mut dyn DevToolsSwitch>,
) -> Result<(), DevToolsError>
Expand description

Set the native DevTools switch for decision. A denied webview is accepted only when the switch was set to off and reads back off; a missing settings object, a failed call or a value that is still on is DevToolsError::NativePolicyNotApplied. A webview that may be inspected is never refused here: failing to turn inspection on is not a security failure.