web_extensions_sys/
scripting.rs

1//! <https://developer.chrome.com/docs/extensions/reference/scripting>
2
3use js_sys::Object;
4use wasm_bindgen::prelude::*;
5
6#[wasm_bindgen]
7extern "C" {
8    pub type Scripting;
9
10    // https://developer.chrome.com/docs/extensions/reference/scripting/#method-insertCSS
11    #[wasm_bindgen(method, catch, js_name = insertCSS)]
12    pub async fn insert_css(this: &Scripting, options: &Object) -> Result<(), JsValue>;
13
14    // https://developer.chrome.com/docs/extensions/reference/scripting/#method-executeScript
15    #[wasm_bindgen(method, catch, js_name = executeScript)]
16    pub async fn execute_script(this: &Scripting, options: &Object) -> Result<JsValue, JsValue>;
17}