stdweb
stdweb copied to clipboard
A standard library for the client-side Web
https://github.com/koute/stdweb/blob/3c8f62f06fc884778409ea79a9fb3f4f2a1c1972/src/lib.rs#L113-L116 This feature was stabilized as part of the macro-related stabilizations in Rust 1.30 so `feature(use_extern_macros)` is no longer needed. Came up in https://github.com/bodil/typed-html/issues/6.
I have started working on bindings for IndexedDB. If no one else is working on this I'll keep going. The IDL has quite a few event handlers like the ones...
```rust #[macro_use] extern crate stdweb; fn bla(){ println!("blarg"); } fn main() { js!{ document.addEventListener("click", @{bla} ); } } ``` Click anywhere on page with console open, see bug.
I noticed there's a lot of repeated code for javascript FFI. This macro means that instead of writing ```rust /// Docs docs docs fn focus( &self ) { js! {...
Right now there's an implementation ```rust impl TryFrom for Vec ``` Unlike most of the other conversions, this unconditionally requires an owned `Array`. Could `TryFrom
Currently, if you have a closure and you want to call it from JavaScript, you can do that very easily by just using the closure in `js!` as if it's...
I'm writing a library which uses `stdweb` for a fairly niche use case and one of the pain points is using generics with `TryFrom` and `stdweb`'s definitions. Right now there...
Not sure this is already on your radar, but as webassembly moves forward it might be worth looking at autogenerating rust interfaces based on WebIDL specs: https://github.com/heycam/webidl This document contains...
The stdweb runtime handles regular closures (that only implement `Fn`) and mutable closures (that implement `FnMut`) the same way. The wrong way, for `FnMut`. It doesn't check that you're not...
Same as #6, except the fully parse the JavaScript code instead of only tokenizing and stringifying it. This is **significantly** harder.