pub fn js_get_table(&self, wait_for_table: bool) -> js_sys::Promise {
        let session = self.session.clone();
        future_to_promise(async move {
            match session.js_get_table() {
                Some(table) => Ok(table),
                None if !wait_for_table => Err(JsValue::from("No table set")),
                None => {
                    session.table_loaded.listen_once().await.into_jserror()?;
                    session.js_get_table().ok_or_else(|| "No table set".into())
                }
            }
        })
    }
/// Get the underlying `Table` for this viewer.
///
/// # Arguments
/// - `wait_for_table` whether to wait for `load()` to be called, or fail
///   immediately if `load()` has not yet been called.
Get the underlying `Table` for this viewer.
Get the underlying ` Table ` for this viewer .
pub fn js_get_table(&self, wait_for_table: bool) -> js_sys::Promise {
        let session = self.session.clone();
        future_to_promise(async move {
            match session.js_get_table() {
                Some(table) => Ok(table),
                None if !wait_for_table => Err(JsValue::from("No table set")),
                None => {
                    session.table_loaded.listen_once().await.into_jserror()?;
                    session.js_get_table().ok_or_else(|| "No table set".into())
                }
            }
        })
    }
pub fn js_get_table ( & self , wait_for_table : bool ) -> js_sys :: Promise { let session = self . session . clone ( ) ; future_to_promise ( async move { match session . js_get_table ( ) { Some ( table ) => Ok ( table ) , None if ! wait_for_table => Err ( JsValue :: from ( " " ) ) , None => { session . table_loaded . listen_once ( ) . await . into_jserror ( ) ? ; session . js_get_table ( ) . ok_or_else ( | | " " . into ( ) ) } } } ) }
Get the underlying `Table` for this viewer.
Get the underlying ` Table ` for this viewer .
&self
wait_for_table
bool
&self
wait_for_table
bool
whether to wait for `load()` to be called, or fail
immediately if `load()` has not yet been called.
whether to wait for ` load () ` to be called or fail immediately if ` load () ` has not yet been called .