diff --git a/api/kotlinx-html.api b/api/kotlinx-html.api index 72adeb65..59fd77cf 100644 --- a/api/kotlinx-html.api +++ b/api/kotlinx-html.api @@ -1262,8 +1262,8 @@ public final class kotlinx/html/Gen_consumer_tagsKt { public static final fun iframe (Lkotlinx/html/TagConsumer;Lkotlinx/html/IframeSandbox;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static synthetic fun iframe$default (Lkotlinx/html/TagConsumer;Lkotlinx/html/IframeSandbox;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun iframe$default (Lkotlinx/html/TagConsumer;Lkotlinx/html/IframeSandbox;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun img (Lkotlinx/html/TagConsumer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; - public static synthetic fun img$default (Lkotlinx/html/TagConsumer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun img (Lkotlinx/html/TagConsumer;Ljava/lang/String;Ljava/lang/String;Lkotlinx/html/ImgLoading;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static synthetic fun img$default (Lkotlinx/html/TagConsumer;Ljava/lang/String;Ljava/lang/String;Lkotlinx/html/ImgLoading;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object; public static final fun input (Lkotlinx/html/TagConsumer;Lkotlinx/html/InputType;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static synthetic fun input$default (Lkotlinx/html/TagConsumer;Lkotlinx/html/InputType;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object; public static final fun ins (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -1532,6 +1532,8 @@ public final class kotlinx/html/Gen_tag_unionsKt { public static synthetic fun details$default (Lkotlinx/html/FlowOrInteractiveContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun dfn (Lkotlinx/html/FlowOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun dfn$default (Lkotlinx/html/FlowOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun eagerImg (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun eagerImg$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun em (Lkotlinx/html/FlowOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun em$default (Lkotlinx/html/FlowOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun emailInput (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V @@ -1574,8 +1576,8 @@ public final class kotlinx/html/Gen_tag_unionsKt { public static synthetic fun iframe$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/IframeSandbox;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun imageInput (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun imageInput$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V - public static final fun img (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public static synthetic fun img$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun img (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Lkotlinx/html/ImgLoading;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun img$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Lkotlinx/html/ImgLoading;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun input (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/InputType;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun input$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/InputType;Lkotlinx/html/InputFormEncType;Lkotlinx/html/InputFormMethod;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun ins (Lkotlinx/html/FlowOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V @@ -1586,6 +1588,8 @@ public final class kotlinx/html/Gen_tag_unionsKt { public static synthetic fun keyGen$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Lkotlinx/html/KeyGenKeyType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun label (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun label$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun lazyImg (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun lazyImg$default (Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun link (Lkotlinx/html/FlowOrMetaDataOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun link$default (Lkotlinx/html/FlowOrMetaDataOrPhrasingContent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun main (Lkotlinx/html/SectioningOrFlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V @@ -1882,6 +1886,8 @@ public final class kotlinx/html/Gen_tags_oKt { } public final class kotlinx/html/Gen_tags_pKt { + public static final fun eagerImg (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun eagerImg$default (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun getAsFlowContent (Lkotlinx/html/P;)Lkotlinx/html/FlowContent; public static final fun getAsFlowContent (Lkotlinx/html/PICTURE;)Lkotlinx/html/FlowContent; public static final fun getAsFlowContent (Lkotlinx/html/PRE;)Lkotlinx/html/FlowContent; @@ -1891,8 +1897,10 @@ public final class kotlinx/html/Gen_tags_pKt { public static final fun getAsPhrasingContent (Lkotlinx/html/PICTURE;)Lkotlinx/html/PhrasingContent; public static final fun getAsPhrasingContent (Lkotlinx/html/PRE;)Lkotlinx/html/PhrasingContent; public static final fun getAsPhrasingContent (Lkotlinx/html/PROGRESS;)Lkotlinx/html/PhrasingContent; - public static final fun img (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public static synthetic fun img$default (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun img (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Lkotlinx/html/ImgLoading;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun img$default (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Lkotlinx/html/ImgLoading;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun lazyImg (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun lazyImg$default (Lkotlinx/html/PICTURE;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun source (Lkotlinx/html/PICTURE;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static synthetic fun source$default (Lkotlinx/html/PICTURE;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V } @@ -2179,12 +2187,14 @@ public class kotlinx/html/IMG : kotlinx/html/HTMLTag, kotlinx/html/CommonAttribu public fun getConsumer ()Lkotlinx/html/TagConsumer; public final fun getHeight ()Ljava/lang/String; public final fun getIsmap ()Z + public final fun getLoading ()Lkotlinx/html/ImgLoading; public final fun getSrc ()Ljava/lang/String; public final fun getUsemap ()Ljava/lang/String; public final fun getWidth ()Ljava/lang/String; public final fun setAlt (Ljava/lang/String;)V public final fun setHeight (Ljava/lang/String;)V public final fun setIsmap (Z)V + public final fun setLoading (Lkotlinx/html/ImgLoading;)V public final fun setSrc (Ljava/lang/String;)V public final fun setUsemap (Ljava/lang/String;)V public final fun setWidth (Ljava/lang/String;)V @@ -2285,6 +2295,15 @@ public final class kotlinx/html/IframeSandbox : java/lang/Enum, kotlinx/html/Att public static fun values ()[Lkotlinx/html/IframeSandbox; } +public final class kotlinx/html/ImgLoading : java/lang/Enum, kotlinx/html/AttributeEnum { + public static final field eager Lkotlinx/html/ImgLoading; + public static final field lazy Lkotlinx/html/ImgLoading; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public fun getRealValue ()Ljava/lang/String; + public static fun valueOf (Ljava/lang/String;)Lkotlinx/html/ImgLoading; + public static fun values ()[Lkotlinx/html/ImgLoading; +} + public final class kotlinx/html/InputFormEncType : java/lang/Enum, kotlinx/html/AttributeEnum { public static final field applicationXWwwFormUrlEncoded Lkotlinx/html/InputFormEncType; public static final field multipartFormData Lkotlinx/html/InputFormEncType; diff --git a/buildSrc/src/main/kotlin/kotlinx/html/generate/rules.kt b/buildSrc/src/main/kotlin/kotlinx/html/generate/rules.kt index 954a8958..a8beced2 100644 --- a/buildSrc/src/main/kotlin/kotlinx/html/generate/rules.kt +++ b/buildSrc/src/main/kotlin/kotlinx/html/generate/rules.kt @@ -56,7 +56,7 @@ val specialTypes = listOf( ).groupBy { it.first }.mapValues { it.value.single().second } fun specialTypeFor(tagName: String, attributeName: String): AttributeType? = - specialTypes[tagName + "." + attributeName] ?: specialTypes["*." + attributeName] + specialTypes["$tagName.$attributeName"] ?: specialTypes["*.$attributeName"] val wellKnownWords = listOf("span", "class", "enabled?", "edit(able)?", "^on", "encoded?", "form", "type", @@ -67,7 +67,7 @@ val wellKnownWords = listOf("span", "class", "enabled?", "edit(able)?", "click", "play(ing)?", "context", "rows?", "cols?", "group(ed)?", "auto", "list", "field", "data", "block", "scripts?", - "item", "area", "length", "colors?", "suspend", "focus", "touch" + "item", "area", "length", "colors?", "suspend", "focus", "touch", "loading" ).map { it.toRegex(RegexOption.IGNORE_CASE) } val excludeAttributes = listOf("^item$").map { Pattern.compile(it, Pattern.CASE_INSENSITIVE) } diff --git a/buildSrc/src/main/resources/html_5.xsd b/buildSrc/src/main/resources/html_5.xsd index 52df735a..76da29e5 100644 --- a/buildSrc/src/main/resources/html_5.xsd +++ b/buildSrc/src/main/resources/html_5.xsd @@ -981,6 +981,14 @@ + + + + + + + + diff --git a/src/commonMain/kotlin/generated/gen-attributes.kt b/src/commonMain/kotlin/generated/gen-attributes.kt index f2125a26..ad0b0dd8 100644 --- a/src/commonMain/kotlin/generated/gen-attributes.kt +++ b/src/commonMain/kotlin/generated/gen-attributes.kt @@ -36,6 +36,8 @@ internal val attributeFormMethodEnumFormMethodValues : Attribute = E internal val attributeIframeSandboxEnumIframeSandboxValues : Attribute = EnumAttribute(iframeSandboxValues) +internal val attributeImgLoadingEnumImgLoadingValues : Attribute = EnumAttribute(imgLoadingValues) + internal val attributeInputFormEncTypeEnumInputFormEncTypeValues : Attribute = EnumAttribute(inputFormEncTypeValues) internal val attributeInputFormMethodEnumInputFormMethodValues : Attribute = EnumAttribute(inputFormMethodValues) diff --git a/src/commonMain/kotlin/generated/gen-consumer-tags.kt b/src/commonMain/kotlin/generated/gen-consumer-tags.kt index 3c451377..c0946941 100644 --- a/src/commonMain/kotlin/generated/gen-consumer-tags.kt +++ b/src/commonMain/kotlin/generated/gen-consumer-tags.kt @@ -74,6 +74,7 @@ import kotlinx.html.IMG import kotlinx.html.INPUT import kotlinx.html.INS import kotlinx.html.IframeSandbox +import kotlinx.html.ImgLoading import kotlinx.html.InputFormEncType import kotlinx.html.InputFormMethod import kotlinx.html.InputType @@ -614,9 +615,11 @@ public inline fun > C.iframe( public inline fun > C.img( alt: String? = null, src: String? = null, + loading: ImgLoading? = null, classes: String? = null, crossinline block: IMG.() -> Unit = {}, -): T = IMG(attributesMapOf("alt", alt,"src", src,"class", classes), this) +): T = IMG(attributesMapOf("alt", alt,"src", src,"loading", loading?.enumEncode(),"class", classes), + this) .visitAndFinalize(this, block) /** diff --git a/src/commonMain/kotlin/generated/gen-enums.kt b/src/commonMain/kotlin/generated/gen-enums.kt index fa19aa4b..6c666c19 100644 --- a/src/commonMain/kotlin/generated/gen-enums.kt +++ b/src/commonMain/kotlin/generated/gen-enums.kt @@ -216,6 +216,13 @@ enum class IframeSandbox(override val realValue : String) : AttributeEnum { internal val iframeSandboxValues : Map = IframeSandbox.values().associateBy { it.realValue } @Suppress("unused") +enum class ImgLoading(override val realValue : String) : AttributeEnum { + eager("eager"), + lazy("lazy") +} + +internal val imgLoadingValues : Map = ImgLoading.values().associateBy { it.realValue } +@Suppress("unused") enum class InputType(override val realValue : String) : AttributeEnum { button("button"), checkBox("checkbox"), diff --git a/src/commonMain/kotlin/generated/gen-tag-unions.kt b/src/commonMain/kotlin/generated/gen-tag-unions.kt index e494ad5f..d2324a70 100644 --- a/src/commonMain/kotlin/generated/gen-tag-unions.kt +++ b/src/commonMain/kotlin/generated/gen-tag-unions.kt @@ -447,7 +447,11 @@ fun FlowOrInteractiveOrPhrasingContent.allowScriptsIframe(classes : String? = nu * Embedded image */ @HtmlTagMarker -inline fun FlowOrInteractiveOrPhrasingContent.img(alt : String? = null, src : String? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"class", classes), consumer).visit(block) +inline fun FlowOrInteractiveOrPhrasingContent.img(alt : String? = null, src : String? = null, loading : ImgLoading? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"loading", loading?.enumEncode(),"class", classes), consumer).visit(block) +@HtmlTagMarker +inline fun FlowOrInteractiveOrPhrasingContent.eagerImg(alt : String? = null, src : String? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"loading", ImgLoading.eager.realValue,"class", classes), consumer).visit(block) +@HtmlTagMarker +inline fun FlowOrInteractiveOrPhrasingContent.lazyImg(alt : String? = null, src : String? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"loading", ImgLoading.lazy.realValue,"class", classes), consumer).visit(block) /** * Pictures container diff --git a/src/commonMain/kotlin/generated/gen-tags-i.kt b/src/commonMain/kotlin/generated/gen-tags-i.kt index e24604ba..8c47e290 100644 --- a/src/commonMain/kotlin/generated/gen-tags-i.kt +++ b/src/commonMain/kotlin/generated/gen-tags-i.kt @@ -84,6 +84,10 @@ open class IMG(initialAttributes : Map, override val consumer : get() = attributeBooleanTicker.get(this, "ismap") set(newValue) {attributeBooleanTicker.set(this, "ismap", newValue)} + var loading : ImgLoading + get() = attributeImgLoadingEnumImgLoadingValues.get(this, "loading") + set(newValue) {attributeImgLoadingEnumImgLoadingValues.set(this, "loading", newValue)} + } val IMG.asFlowContent : FlowContent diff --git a/src/commonMain/kotlin/generated/gen-tags-p.kt b/src/commonMain/kotlin/generated/gen-tags-p.kt index 97043b04..df3501e8 100644 --- a/src/commonMain/kotlin/generated/gen-tags-p.kt +++ b/src/commonMain/kotlin/generated/gen-tags-p.kt @@ -47,7 +47,11 @@ inline fun PICTURE.source(classes : String? = null, crossinline block : SOURCE.( * Embedded image */ @HtmlTagMarker -inline fun PICTURE.img(alt : String? = null, src : String? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"class", classes), consumer).visit(block) +inline fun PICTURE.img(alt : String? = null, src : String? = null, loading : ImgLoading? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"loading", loading?.enumEncode(),"class", classes), consumer).visit(block) +@HtmlTagMarker +inline fun PICTURE.eagerImg(alt : String? = null, src : String? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"loading", ImgLoading.eager.realValue,"class", classes), consumer).visit(block) +@HtmlTagMarker +inline fun PICTURE.lazyImg(alt : String? = null, src : String? = null, classes : String? = null, crossinline block : IMG.() -> Unit = {}) : Unit = IMG(attributesMapOf("alt", alt,"src", src,"loading", ImgLoading.lazy.realValue,"class", classes), consumer).visit(block) val PICTURE.asFlowContent : FlowContent get() = this diff --git a/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt b/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt index 698c3ca9..c1f10044 100644 --- a/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt +++ b/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt @@ -74,6 +74,7 @@ import kotlinx.html.IMG import kotlinx.html.INPUT import kotlinx.html.INS import kotlinx.html.IframeSandbox +import kotlinx.html.ImgLoading import kotlinx.html.InputFormEncType import kotlinx.html.InputFormMethod import kotlinx.html.InputType @@ -675,9 +676,11 @@ public inline fun TagConsumer.iframe( public inline fun TagConsumer.img( alt: String? = null, src: String? = null, + loading: ImgLoading? = null, classes: String? = null, crossinline block: IMG.() -> Unit = {}, -): HTMLImageElement = IMG(attributesMapOf("alt", alt,"src", src,"class", classes), this) +): HTMLImageElement = IMG(attributesMapOf("alt", alt,"src", src,"loading", + loading?.enumEncode(),"class", classes), this) .visitAndFinalize(this, block) as HTMLImageElement /** diff --git a/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt b/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt index 62e6d856..05c8c036 100644 --- a/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt +++ b/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt @@ -74,6 +74,7 @@ import kotlinx.html.IMG import kotlinx.html.INPUT import kotlinx.html.INS import kotlinx.html.IframeSandbox +import kotlinx.html.ImgLoading import kotlinx.html.InputFormEncType import kotlinx.html.InputFormMethod import kotlinx.html.InputType @@ -674,9 +675,11 @@ public inline fun TagConsumer.iframe( public inline fun TagConsumer.img( alt: String? = null, src: String? = null, + loading: ImgLoading? = null, classes: String? = null, crossinline block: IMG.() -> Unit = {}, -): HTMLImageElement = IMG(attributesMapOf("alt", alt,"src", src,"class", classes), this) +): HTMLImageElement = IMG(attributesMapOf("alt", alt,"src", src,"loading", + loading?.enumEncode(),"class", classes), this) .visitAndFinalize(this, block) as HTMLImageElement /**