pub fn js_load(&self, table: JsValue) -> js_sys::Promise {
        assert!(!table.is_undefined());
        let table = if let Ok(table) = table.clone().dyn_into::<js_sys::Promise>() {
            table
        } else {
            js_sys::Promise::resolve(&table)
        };

        let mut config = ViewConfigUpdate::default();
        self.session
            .set_update_column_defaults(&mut config, &self.renderer.metadata());

        self.session.update_view_config(config);

        clone!(self.renderer, self.session);
        future_to_promise(async move {
            renderer
                .draw(async {
                    let promise = JsFuture::from(table).await?;
                    let table: JsPerspectiveTable = promise.unchecked_into();
                    session.reset_stats();
                    session.set_table(table).await?;
                    session.validate().await?.create_view().await
                })
                .await
        })
    }
/// Loads a promise to a `JsPerspectiveTable` in this viewer.
Loads a promise to a `JsPerspectiveTable` in this viewer.
Loads a promise to a ` JsPerspectiveTable ` in this viewer .
pub fn js_load(&self, table: JsValue) -> js_sys::Promise {
        assert!(!table.is_undefined());
        let table = if let Ok(table) = table.clone().dyn_into::<js_sys::Promise>() {
            table
        } else {
            js_sys::Promise::resolve(&table)
        };
        let mut config = ViewConfigUpdate::default();
        self.session
            .set_update_column_defaults(&mut config, &self.renderer.metadata());
        self.session.update_view_config(config);
        clone!(self.renderer, self.session);
        future_to_promise(async move {
            renderer
                .draw(async {
                    let promise = JsFuture::from(table).await?;
                    let table: JsPerspectiveTable = promise.unchecked_into();
                    session.reset_stats();
                    session.set_table(table).await?;
                    session.validate().await?.create_view().await
                })
                .await
        })
    }
pub fn js_load ( & self , table : JsValue ) -> js_sys :: Promise { assert ! ( table is_undefined ( ) ) ; let table = if let Ok ( table ) = table . clone ( ) . dyn_into :: < js_sys :: Promise > ( ) { table } else { js_sys :: Promise :: resolve ( & table ) } ; let mut config = ViewConfigUpdate :: default ( ) ; self . session . set_update_column_defaults ( & mut config , & self . renderer . metadata ( ) ) ; self . session . update_view_config ( config ) ; clone ! ( self renderer self session ) ; future_to_promise ( async move { renderer . draw ( async { let promise = JsFuture :: from ( table ) . await ? ; let table : JsPerspectiveTable = promise . unchecked_into ( ) ; session . reset_stats ( ) ; session . set_table ( table ) . await ? ; session . validate ( ) . await ? . create_view ( ) . await } ) . await } ) }
Loads a promise to a `JsPerspectiveTable` in this viewer.
Loads a promise to a ` JsPerspectiveTable ` in this viewer .
&self
table
JsValue
&self
table
JsValue