Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] To operate DOM through wrapped EM_ASM_ interface #11

Open
diyism opened this issue Sep 18, 2018 · 2 comments
Open

[feature request] To operate DOM through wrapped EM_ASM_ interface #11

diyism opened this issue Sep 18, 2018 · 2 comments

Comments

@diyism
Copy link

diyism commented Sep 18, 2018

To operate DOM through wrapped EM_ASM_ interface

reference: http://webassemblycode.com/webassembly-cant-access-dom/

@oraoto
Copy link
Owner

oraoto commented Sep 18, 2018

I had considered implement DOM access through EM_ASM, but it require too much work. EM_ASM works with C/C++, so we need a PHP extension. And to do useful things, we need event-handlers, which go throught JavaScript, C and finally PHP, which it is not easy to implement.

Another approch is split the code in two parts:

  1. JS part handle actual render and captures events, pass them to the PHP part
  2. PHP process the event and return the updated view to JS part.

@Sarke
Copy link

Sarke commented Feb 15, 2020

Could FFI be used for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants