pib icon indicating copy to clipboard operation
pib copied to clipboard

[feature request] To operate DOM through wrapped EM_ASM_ interface

Open diyism opened this issue 6 years ago • 2 comments

To operate DOM through wrapped EM_ASM_ interface

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

diyism avatar Sep 18 '18 02:09 diyism

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.

oraoto avatar Sep 18 '18 08:09 oraoto

Could FFI be used for this?

Sarke avatar Feb 15 '20 03:02 Sarke