Commit Graph

2 Commits

Author SHA1 Message Date
Alex Crichton
5a3cd893e0 Implement AsRef<JsValue> for Closure<T>
This commit adds an implementation of `AsRef<JsValue>` for the `Closure<T>`
type. Previously this was not possible because the `JsValue` didn't actually
exist until the closure was passed to JS, but the implementation has been
changed to ... something a bit more unconventional. The end result, however, is
that `Closure<T>` now always contains a `JsValue`.

The end result of this work is intended to be a precursor to binding callbacks
in `web-sys` as `JsValue` everywhere but still allowing usage with `Closure<T>`.
2018-09-06 14:46:59 -07:00
Nick Fitzgerald
81c9bbd1bd Add links section to Cargo.toml
Because only a single `wasm_bindgen` version can be used in a dependency graph,
pretend we link a native library so that `cargo` will provide better error
messages than the esoteric linker errors we would otherwise trigger.
2018-08-30 13:04:27 -07:00