You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement a "callback" where as a user types, the content they have typed thus far is sent back to Rust for some processing (namely, autocomplete). I'm unclear on the syntax or in general how this would be accomplished given the tools exposed in horrorshow. So, my question is two parts:
a) Is this possible at all?
b) If yes to (a), what would that look like?
After I figure this out, I would like to write up examples/documentation and contribute them to the repository to help others out.
Thanks!
The text was updated successfully, but these errors were encountered:
Horrorshow just spits out HTML, interacting with JavaScript and the DOM isn't really in scope.
Basically, you'd need to listen for input events (https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event) (or keydown events) in javascript, then call back into rust (how depends on what tools you're using and whether you're running rust on the client using WASM or on a server).
Thanks for the response -- I guess I was thinking of including some script tag in horrorshow which handled the callback, but that does seem out of scope in hindsight.
I'm trying to implement a "callback" where as a user types, the content they have typed thus far is sent back to Rust for some processing (namely, autocomplete). I'm unclear on the syntax or in general how this would be accomplished given the tools exposed in horrorshow. So, my question is two parts:
a) Is this possible at all?
b) If yes to (a), what would that look like?
After I figure this out, I would like to write up examples/documentation and contribute them to the repository to help others out.
Thanks!
The text was updated successfully, but these errors were encountered: