pub fn js_reset(&self, reset_expressions: JsValue) -> js_sys::Promise {
        let root = self.root.clone();
        let all = reset_expressions.as_bool().unwrap_or_default();
        promisify_ignore_view_delete(async move {
            let task = root
                .borrow()
                .as_ref()
                .ok_or("Already deleted")?
                .promise_message(move |x| Msg::Reset(all, Some(x)));

            task.await.into_jserror()?;
            Ok(JsValue::UNDEFINED)
        })
    }
/// Reset the viewer's `ViewerConfig` to the default.
///
/// # Arguments
/// - `all` Whether to clear `expressions` also.
Reset the viewer's `ViewerConfig` to the default.
Reset the viewer ' s ` ViewerConfig ` to the default .
pub fn js_reset(&self, reset_expressions: JsValue) -> js_sys::Promise {
        let root = self.root.clone();
        let all = reset_expressions.as_bool().unwrap_or_default();
        promisify_ignore_view_delete(async move {
            let task = root
                .borrow()
                .as_ref()
                .ok_or("Already deleted")?
                .promise_message(move |x| Msg::Reset(all, Some(x)));
            task.await.into_jserror()?;
            Ok(JsValue::UNDEFINED)
        })
    }
pub fn js_reset ( & self , reset_expressions : JsValue ) -> js_sys :: Promise { let root = self . root . clone ( ) ; let all = reset_expressions . as_bool ( ) . unwrap_or_default ( ) ; promisify_ignore_view_delete ( async move { let task = root . borrow ( ) . as_ref ( ) . ok_or ( " " ) ? . promise_message ( move | x | Msg :: Reset ( all , Some ( x ) ) ) ; task . await . into_jserror ( ) ? ; Ok ( JsValue :: UNDEFINED ) } ) }
Reset the viewer's `ViewerConfig` to the default.
Reset the viewer ' s ` ViewerConfig ` to the default .
&self
reset_expressions
JsValue
&self
reset_expressions
JsValue
all
Whether to clear `expressions` also.
Whether to clear ` expressions ` also .