Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose WASM methods for getting and setting signal and data values #272

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

jonmmease
Copy link
Collaborator

@jonmmease jonmmease commented Mar 20, 2023

Adds several public Vega View methods to the MsgReceiver WASM struct:

pub fn get_signal(&self, name: &str, scope: &[u32]) -> JsValue ;

pub fn get_data(&self, name: &str, scope: &[u32]) -> JsValue;

pub fn set_signal(&self, name: &str, scope: &[u32], value: JsValue);

pub fn set_data(&self, name: &str, scope: &[u32], value: JsValue);

pub fn get_state(&self) -> JsValue;

pub fn set_state(&self, state: JsValue);

pub fn run(&self);

pub fn run_async(&self) -> Promise;

These are to make it easier to introspect and manipulate the view from outside.

@jonmmease jonmmease merged commit 4876ac6 into main Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant