koute / stdweb

A standard library for the client-side Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Idea: Implementation of CustomEvent?

mbuscemi opened this issue · comments

I've been working on setting up bi-directional communication between an app's Webview and Yew (stdweb-based) layers. Getting messages from Webview back into Yew was particularly challenging. With help from the maintainer of Webview, I eventually found a solution using the CustomEvent API in JS.

I got this to work on the Yew/stdweb layer using a js! block. However, small typos in JavaScript code yield obscure errors. I would prefer to utilize something document().add_event_listener( ... ). However, there does not appear to be a CustomEvent implementation for stdweb.

I would be happy to work on contributing that, if there is a desire for it.