diff --git a/resources/rapydscript/compiler.js.xz b/resources/rapydscript/compiler.js.xz index 56f8b0a006..72a9d66b11 100644 Binary files a/resources/rapydscript/compiler.js.xz and b/resources/rapydscript/compiler.js.xz differ diff --git a/resources/rapydscript/lib/elementmaker.pyj b/resources/rapydscript/lib/elementmaker.pyj index 895df24134..84c223935f 100644 --- a/resources/rapydscript/lib/elementmaker.pyj +++ b/resources/rapydscript/lib/elementmaker.pyj @@ -60,7 +60,13 @@ def E(tag, *args, **kwargs): for attr in kwargs: vattr = str.replace(str.rstrip(attr, '_'), '_', '-') - ans.setAttribute(vattr, kwargs[attr]) + val = kwargs[attr] + if callable(val): + if str.startswith(attr, 'on'): + attr = attr[2:] + ans.addEventListener(attr, val) + else: + ans.setAttribute(vattr, val) for arg in args: if type(arg) == 'string':