pib
pib copied to clipboard
[feature request] To operate DOM through wrapped EM_ASM_ interface
To operate DOM through wrapped EM_ASM_ interface
reference: http://webassemblycode.com/webassembly-cant-access-dom/
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:
- JS part handle actual render and captures events, pass them to the PHP part
- PHP process the event and return the updated view to JS part.
Could FFI be used for this?