From https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.HtmlCanvasElement.html
I need to use:
pub fn get_context_with_context_options(
&self,
context_id: &str,
context_options: &JsValue
) -> Result<Option<Object>, JsValue>
for the context_options
argument, I want to pass it the Jsvalue of
{ premultipliedAlpha: false }
This involves constructing this value via:
The problem I run into is that I see constructing from f64 / bool / string -- but no way to construct a map.
How do I construct a wasm_bindgen::JsValue
with a value of
{ premultipliedAlpha: False }
?