Function inject_script

Source
pub fn inject_script<C>(
    root: Element,
    id: Option<&str>,
    content: &[u8],
    content_type: &str,
    callback: Option<&C>,
) -> Result<()>
where C: AsRef<Function>,
Expand description

Inject script as a Blob buffer into DOM. Executes an optional load callback when the loading is complete. The load callback receives web_sys::CustomEvent struct indicating the load result.