Skip to content

Commit

Permalink
Adding html tag <main>
Browse files Browse the repository at this point in the history
Fixes Kotlin#68
  • Loading branch information
Hans-Christian Fjeldberg-Gustavson committed Apr 25, 2018
1 parent 833a1a5 commit d869a8f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generate/src/main/resources/html_5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
<xsd:element ref="label"/>
<xsd:element ref="link"/>

<xsd:element ref="main"/>
<xsd:element ref="map"/>
<xsd:element ref="mark"/>
<xsd:element ref="math"/>
Expand Down Expand Up @@ -336,6 +337,7 @@
<xsd:element ref="aside"/>
<xsd:element ref="nav"/>
<xsd:element ref="section"/>
<xsd:element ref="main"/>
</xsd:choice>
</xsd:group>

Expand Down Expand Up @@ -625,6 +627,7 @@
</xsd:complexType>
</xsd:element>

<xsd:element name="main" type="simpleFlowContentElement"/>
<xsd:element name="section" type="simpleFlowContentElement"/>
<xsd:element name="nav" type="simpleFlowContentElement"/>

Expand Down
6 changes: 6 additions & 0 deletions js/src/main/kotlin/generated/gen-consumer-tags-js.kt
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@ public fun TagConsumer<HTMLElement>.li(classes : String? = null, block : LI.() -
@HtmlTagMarker
public fun TagConsumer<HTMLElement>.link(href : String? = null, rel : String? = null, type : String? = null, block : LINK.() -> Unit = {}) : HTMLLinkElement = LINK(attributesMapOf("href", href,"rel", rel,"type", type), this).visitAndFinalize(this, block) as HTMLLinkElement

/**
* Container for the dominant contents of another element
*/
@HtmlTagMarker
public fun TagConsumer<HTMLElement>.main(classes : String? = null, block : MAIN.() -> Unit = {}) : HTMLElement = MAIN(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Client-side image map
*/
Expand Down
6 changes: 6 additions & 0 deletions shared/src/main/kotlin/generated/gen-consumer-tags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ fun <T, C : TagConsumer<T>> C.li(classes : String? = null, block : LI.() -> Unit
@HtmlTagMarker
fun <T, C : TagConsumer<T>> C.link(href : String? = null, rel : String? = null, type : String? = null, block : LINK.() -> Unit = {}) : T = LINK(attributesMapOf("href", href,"rel", rel,"type", type), this).visitAndFinalize(this, block)

/**
* Container for the dominant contents of another element
*/
@HtmlTagMarker
fun <T, C : TagConsumer<T>> C.main(classes : String? = null, block : MAIN.() -> Unit = {}) : T = MAIN(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Client-side image map
*/
Expand Down
6 changes: 6 additions & 0 deletions shared/src/main/kotlin/generated/gen-tag-unions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ fun SectioningOrFlowContent.nav(classes : String? = null, block : NAV.() -> Unit
@HtmlTagMarker
fun SectioningOrFlowContent.section(classes : String? = null, block : SECTION.() -> Unit = {}) : Unit = SECTION(attributesMapOf("class", classes), consumer).visit(block)

/**
* Container for the dominant contents of another element
*/
@HtmlTagMarker
fun SectioningOrFlowContent.main(classes : String? = null, block : MAIN.() -> Unit = {}) : Unit = MAIN(attributesMapOf("class", classes), consumer).visit(block)


/**
* Anchor
Expand Down
11 changes: 11 additions & 0 deletions shared/src/main/kotlin/generated/gen-tags-m.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import kotlinx.html.attributes.*
This file was generated by module generate
*******************************************************************************/

@Suppress("unused")
open class MAIN(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("main", consumer, initialAttributes, null, false, false), CommonAttributeGroupFacadeFlowSectioningContent {

}
val MAIN.asFlowContent : FlowContent
get() = this

val MAIN.asSectioningContent : SectioningContent
get() = this


@Suppress("unused")
open class MAP(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("map", consumer, initialAttributes, null, true, false), HtmlBlockInlineTag {
var name : String
Expand Down

0 comments on commit d869a8f

Please sign in to comment.