From dd40377e714da5e0ae032214c0d3e4453d6cfbf6 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 10 Mar 2024 19:08:02 +0100 Subject: [PATCH] [mujs] 2nd param for Event constructor --- src/ecmascript/mujs/event.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ecmascript/mujs/event.c b/src/ecmascript/mujs/event.c index 2950d0a9..6e66db5d 100644 --- a/src/ecmascript/mujs/event.c +++ b/src/ecmascript/mujs/event.c @@ -181,6 +181,16 @@ mjs_event_constructor(js_State *J) } event->type_ = null_or_stracpy(js_tostring(J, 1)); + js_getproperty(J, 2, "bubbles"); + event->bubbles = js_toboolean(J, -1); + js_pop(J, 1); + js_getproperty(J, 2, "cancelable"); + event->cancelable = js_toboolean(J, -1); + js_pop(J, 1); + js_getproperty(J, 2, "composed"); + event->composed = js_toboolean(J, -1); + js_pop(J, 1); + js_newobject(J); { js_newuserdata(J, "event", event, mjs_event_finalizer);