From 2000e13f6ffa7db92d4a8d55724fc398bef974ee Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Thu, 11 Aug 2022 13:22:21 +0300 Subject: [PATCH] Change callback properties on stdlib event for better usability (#194) --- .../kotlinx/html/generate/attributes.kt | 5 +- .../kotlin/generated/gen-event-attrs-js.kt | 248 +++++++++--------- 2 files changed, 127 insertions(+), 126 deletions(-) diff --git a/buildSrc/src/main/kotlin/kotlinx/html/generate/attributes.kt b/buildSrc/src/main/kotlin/kotlinx/html/generate/attributes.kt index 5a479975..d6041486 100644 --- a/buildSrc/src/main/kotlin/kotlinx/html/generate/attributes.kt +++ b/buildSrc/src/main/kotlin/kotlinx/html/generate/attributes.kt @@ -48,9 +48,10 @@ fun Appendable.facade(facade: AttributeFacade) { } fun Appendable.eventProperty(parent: String, attribute: AttributeInfo) { + val type = "(org.w3c.dom.events.Event) -> Unit" variable(receiver = parent, variable = Var( name = attribute.fieldName + "Function", - type = "(Event) -> Unit", + type = type, mutable = true )) emptyLine() @@ -64,7 +65,7 @@ fun Appendable.eventProperty(parent: String, attribute: AttributeInfo) { functionCall("onTagEvent", listOf( "this", attribute.name.quote(), - "newValue" + "newValue.unsafeCast<(Event) -> Unit>()" )) } emptyLine() diff --git a/src/jsMain/kotlin/generated/gen-event-attrs-js.kt b/src/jsMain/kotlin/generated/gen-event-attrs-js.kt index a1d7385b..cfa3cd65 100644 --- a/src/jsMain/kotlin/generated/gen-event-attrs-js.kt +++ b/src/jsMain/kotlin/generated/gen-event-attrs-js.kt @@ -8,251 +8,251 @@ import kotlinx.html.org.w3c.dom.events.Event This file was generated by module generate *******************************************************************************/ -var CommonAttributeGroupFacade.onAbortFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onAbortFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onAbort") - set(newValue) {consumer.onTagEvent(this, "onabort", newValue)} + set(newValue) {consumer.onTagEvent(this, "onabort", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onBlurFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onBlurFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onBlur") - set(newValue) {consumer.onTagEvent(this, "onblur", newValue)} + set(newValue) {consumer.onTagEvent(this, "onblur", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onCanPlayFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onCanPlayFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onCanPlay") - set(newValue) {consumer.onTagEvent(this, "oncanplay", newValue)} + set(newValue) {consumer.onTagEvent(this, "oncanplay", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onCanPlayThroughFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onCanPlayThroughFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onCanPlayThrough") - set(newValue) {consumer.onTagEvent(this, "oncanplaythrough", newValue)} + set(newValue) {consumer.onTagEvent(this, "oncanplaythrough", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onChangeFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onChangeFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onChange") - set(newValue) {consumer.onTagEvent(this, "onchange", newValue)} + set(newValue) {consumer.onTagEvent(this, "onchange", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onClickFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onClickFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onClick") - set(newValue) {consumer.onTagEvent(this, "onclick", newValue)} + set(newValue) {consumer.onTagEvent(this, "onclick", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onContextMenuFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onContextMenuFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onContextMenu") - set(newValue) {consumer.onTagEvent(this, "oncontextmenu", newValue)} + set(newValue) {consumer.onTagEvent(this, "oncontextmenu", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDoubleClickFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDoubleClickFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDoubleClick") - set(newValue) {consumer.onTagEvent(this, "ondblclick", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondblclick", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDragFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDragFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDrag") - set(newValue) {consumer.onTagEvent(this, "ondrag", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondrag", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDragEndFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDragEndFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDragEnd") - set(newValue) {consumer.onTagEvent(this, "ondragend", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondragend", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDragEnterFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDragEnterFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDragEnter") - set(newValue) {consumer.onTagEvent(this, "ondragenter", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondragenter", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDragLeaveFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDragLeaveFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDragLeave") - set(newValue) {consumer.onTagEvent(this, "ondragleave", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondragleave", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDragOverFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDragOverFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDragOver") - set(newValue) {consumer.onTagEvent(this, "ondragover", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondragover", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDragStartFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDragStartFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDragStart") - set(newValue) {consumer.onTagEvent(this, "ondragstart", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondragstart", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDropFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDropFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDrop") - set(newValue) {consumer.onTagEvent(this, "ondrop", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondrop", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onDurationChangeFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onDurationChangeFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onDurationChange") - set(newValue) {consumer.onTagEvent(this, "ondurationchange", newValue)} + set(newValue) {consumer.onTagEvent(this, "ondurationchange", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onEmptiedFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onEmptiedFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onEmptied") - set(newValue) {consumer.onTagEvent(this, "onemptied", newValue)} + set(newValue) {consumer.onTagEvent(this, "onemptied", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onEndedFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onEndedFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onEnded") - set(newValue) {consumer.onTagEvent(this, "onended", newValue)} + set(newValue) {consumer.onTagEvent(this, "onended", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onErrorFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onErrorFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onError") - set(newValue) {consumer.onTagEvent(this, "onerror", newValue)} + set(newValue) {consumer.onTagEvent(this, "onerror", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onFocusFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onFocusFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onFocus") - set(newValue) {consumer.onTagEvent(this, "onfocus", newValue)} + set(newValue) {consumer.onTagEvent(this, "onfocus", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onFocusInFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onFocusInFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onFocusIn") - set(newValue) {consumer.onTagEvent(this, "onfocusin", newValue)} + set(newValue) {consumer.onTagEvent(this, "onfocusin", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onFocusOutFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onFocusOutFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onFocusOut") - set(newValue) {consumer.onTagEvent(this, "onfocusout", newValue)} + set(newValue) {consumer.onTagEvent(this, "onfocusout", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onFormChangeFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onFormChangeFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onFormChange") - set(newValue) {consumer.onTagEvent(this, "onformchange", newValue)} + set(newValue) {consumer.onTagEvent(this, "onformchange", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onFormInputFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onFormInputFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onFormInput") - set(newValue) {consumer.onTagEvent(this, "onforminput", newValue)} + set(newValue) {consumer.onTagEvent(this, "onforminput", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onInputFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onInputFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onInput") - set(newValue) {consumer.onTagEvent(this, "oninput", newValue)} + set(newValue) {consumer.onTagEvent(this, "oninput", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onInvalidFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onInvalidFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onInvalid") - set(newValue) {consumer.onTagEvent(this, "oninvalid", newValue)} + set(newValue) {consumer.onTagEvent(this, "oninvalid", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onKeyDownFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onKeyDownFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onKeyDown") - set(newValue) {consumer.onTagEvent(this, "onkeydown", newValue)} + set(newValue) {consumer.onTagEvent(this, "onkeydown", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onKeyPressFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onKeyPressFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onKeyPress") - set(newValue) {consumer.onTagEvent(this, "onkeypress", newValue)} + set(newValue) {consumer.onTagEvent(this, "onkeypress", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onKeyUpFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onKeyUpFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onKeyUp") - set(newValue) {consumer.onTagEvent(this, "onkeyup", newValue)} + set(newValue) {consumer.onTagEvent(this, "onkeyup", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onLoadFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onLoadFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onLoad") - set(newValue) {consumer.onTagEvent(this, "onload", newValue)} + set(newValue) {consumer.onTagEvent(this, "onload", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onLoadedDataFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onLoadedDataFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onLoadedData") - set(newValue) {consumer.onTagEvent(this, "onloadeddata", newValue)} + set(newValue) {consumer.onTagEvent(this, "onloadeddata", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onLoadedMetaDataFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onLoadedMetaDataFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onLoadedMetaData") - set(newValue) {consumer.onTagEvent(this, "onloadedmetadata", newValue)} + set(newValue) {consumer.onTagEvent(this, "onloadedmetadata", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onLoadStartFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onLoadStartFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onLoadStart") - set(newValue) {consumer.onTagEvent(this, "onloadstart", newValue)} + set(newValue) {consumer.onTagEvent(this, "onloadstart", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onMouseDownFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onMouseDownFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onMouseDown") - set(newValue) {consumer.onTagEvent(this, "onmousedown", newValue)} + set(newValue) {consumer.onTagEvent(this, "onmousedown", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onMouseMoveFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onMouseMoveFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onMouseMove") - set(newValue) {consumer.onTagEvent(this, "onmousemove", newValue)} + set(newValue) {consumer.onTagEvent(this, "onmousemove", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onMouseOutFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onMouseOutFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onMouseOut") - set(newValue) {consumer.onTagEvent(this, "onmouseout", newValue)} + set(newValue) {consumer.onTagEvent(this, "onmouseout", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onMouseOverFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onMouseOverFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onMouseOver") - set(newValue) {consumer.onTagEvent(this, "onmouseover", newValue)} + set(newValue) {consumer.onTagEvent(this, "onmouseover", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onMouseUpFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onMouseUpFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onMouseUp") - set(newValue) {consumer.onTagEvent(this, "onmouseup", newValue)} + set(newValue) {consumer.onTagEvent(this, "onmouseup", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onMouseWheelFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onMouseWheelFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onMouseWheel") - set(newValue) {consumer.onTagEvent(this, "onmousewheel", newValue)} + set(newValue) {consumer.onTagEvent(this, "onmousewheel", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onPauseFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onPauseFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onPause") - set(newValue) {consumer.onTagEvent(this, "onpause", newValue)} + set(newValue) {consumer.onTagEvent(this, "onpause", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onPlayFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onPlayFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onPlay") - set(newValue) {consumer.onTagEvent(this, "onplay", newValue)} + set(newValue) {consumer.onTagEvent(this, "onplay", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onPlayingFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onPlayingFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onPlaying") - set(newValue) {consumer.onTagEvent(this, "onplaying", newValue)} + set(newValue) {consumer.onTagEvent(this, "onplaying", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onProgressFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onProgressFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onProgress") - set(newValue) {consumer.onTagEvent(this, "onprogress", newValue)} + set(newValue) {consumer.onTagEvent(this, "onprogress", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onRateChangeFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onRateChangeFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onRateChange") - set(newValue) {consumer.onTagEvent(this, "onratechange", newValue)} + set(newValue) {consumer.onTagEvent(this, "onratechange", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onReadyStateChangeFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onReadyStateChangeFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onReadyStateChange") - set(newValue) {consumer.onTagEvent(this, "onreadystatechange", newValue)} + set(newValue) {consumer.onTagEvent(this, "onreadystatechange", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onScrollFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onScrollFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onScroll") - set(newValue) {consumer.onTagEvent(this, "onscroll", newValue)} + set(newValue) {consumer.onTagEvent(this, "onscroll", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onSearchFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onSearchFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onSearch") - set(newValue) {consumer.onTagEvent(this, "onsearch", newValue)} + set(newValue) {consumer.onTagEvent(this, "onsearch", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onSeekedFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onSeekedFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onSeeked") - set(newValue) {consumer.onTagEvent(this, "onseeked", newValue)} + set(newValue) {consumer.onTagEvent(this, "onseeked", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onSeekingFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onSeekingFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onSeeking") - set(newValue) {consumer.onTagEvent(this, "onseeking", newValue)} + set(newValue) {consumer.onTagEvent(this, "onseeking", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onSelectFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onSelectFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onSelect") - set(newValue) {consumer.onTagEvent(this, "onselect", newValue)} + set(newValue) {consumer.onTagEvent(this, "onselect", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onShowFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onShowFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onShow") - set(newValue) {consumer.onTagEvent(this, "onshow", newValue)} + set(newValue) {consumer.onTagEvent(this, "onshow", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onStalledFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onStalledFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onStalled") - set(newValue) {consumer.onTagEvent(this, "onstalled", newValue)} + set(newValue) {consumer.onTagEvent(this, "onstalled", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onSubmitFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onSubmitFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onSubmit") - set(newValue) {consumer.onTagEvent(this, "onsubmit", newValue)} + set(newValue) {consumer.onTagEvent(this, "onsubmit", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onSuspendFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onSuspendFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onSuspend") - set(newValue) {consumer.onTagEvent(this, "onsuspend", newValue)} + set(newValue) {consumer.onTagEvent(this, "onsuspend", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onTimeUpdateFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onTimeUpdateFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onTimeUpdate") - set(newValue) {consumer.onTagEvent(this, "ontimeupdate", newValue)} + set(newValue) {consumer.onTagEvent(this, "ontimeupdate", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onTouchCancelFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onTouchCancelFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onTouchCancel") - set(newValue) {consumer.onTagEvent(this, "ontouchcancel", newValue)} + set(newValue) {consumer.onTagEvent(this, "ontouchcancel", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onTouchEndFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onTouchEndFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onTouchEnd") - set(newValue) {consumer.onTagEvent(this, "ontouchend", newValue)} + set(newValue) {consumer.onTagEvent(this, "ontouchend", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onTouchMoveFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onTouchMoveFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onTouchMove") - set(newValue) {consumer.onTagEvent(this, "ontouchmove", newValue)} + set(newValue) {consumer.onTagEvent(this, "ontouchmove", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onTouchStartFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onTouchStartFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onTouchStart") - set(newValue) {consumer.onTagEvent(this, "ontouchstart", newValue)} + set(newValue) {consumer.onTagEvent(this, "ontouchstart", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onVolumeChangeFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onVolumeChangeFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onVolumeChange") - set(newValue) {consumer.onTagEvent(this, "onvolumechange", newValue)} + set(newValue) {consumer.onTagEvent(this, "onvolumechange", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onWaitingFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onWaitingFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onWaiting") - set(newValue) {consumer.onTagEvent(this, "onwaiting", newValue)} + set(newValue) {consumer.onTagEvent(this, "onwaiting", newValue.unsafeCast<(Event) -> Unit>())} -var CommonAttributeGroupFacade.onWheelFunction : (Event) -> Unit +var CommonAttributeGroupFacade.onWheelFunction : (org.w3c.dom.events.Event) -> Unit get() = throw UnsupportedOperationException("You can't read variable onWheel") - set(newValue) {consumer.onTagEvent(this, "onwheel", newValue)} + set(newValue) {consumer.onTagEvent(this, "onwheel", newValue.unsafeCast<(Event) -> Unit>())}