added event example
This commit is contained in:
parent
780189a1a6
commit
6c3539fcd5
9 changed files with 249 additions and 31 deletions
|
|
@ -59,7 +59,7 @@ function addClickListener(ptr, handlerID) {
|
|||
// Create a handler that will trigger a notification to C++
|
||||
const handler = function (event) {
|
||||
const { ExecuteClickHandler } = window.crafter_webbuild_wasi.instance.exports;
|
||||
ExecuteClickHandler(handlerID);
|
||||
ExecuteClickHandler(handlerID, event.clientX, event.clientY, event.screenX, event.screenY, event.button, event.buttons, event.altKey, event.ctrlKey, event.shiftKey, event.metaKey);
|
||||
};
|
||||
|
||||
eventHandlers.set(`${ptr}-${handlerID}`, handler);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue