@@ -65,9 +65,81 @@ inline fun FlowOrMetaDataOrPhrasingContent.radioCommand(classes : String? = null
65
65
*/
66
66
@HtmlTagMarker
67
67
@OptIn(ExperimentalContracts ::class )
68
- inline fun FlowOrMetaDataOrPhrasingContent.link (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
68
+ inline fun FlowOrMetaDataOrPhrasingContent.link (href : String? = null, rel : String? = null, type : String? = null, htmlAs : LinkAs ? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
69
69
contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
70
- LINK (attributesMapOf(" href" , href," rel" , rel," type" , type), consumer).visit(block)
70
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , htmlAs?.enumEncode()), consumer).visit(block)
71
+ }
72
+ @HtmlTagMarker
73
+ @OptIn(ExperimentalContracts ::class )
74
+ inline fun FlowOrMetaDataOrPhrasingContent.audioLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
75
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
76
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .audio.realValue), consumer).visit(block)
77
+ }
78
+ @HtmlTagMarker
79
+ @OptIn(ExperimentalContracts ::class )
80
+ inline fun FlowOrMetaDataOrPhrasingContent.documentLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
81
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
82
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .document.realValue), consumer).visit(block)
83
+ }
84
+ @HtmlTagMarker
85
+ @OptIn(ExperimentalContracts ::class )
86
+ inline fun FlowOrMetaDataOrPhrasingContent.embedLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
87
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
88
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .embed.realValue), consumer).visit(block)
89
+ }
90
+ @HtmlTagMarker
91
+ @OptIn(ExperimentalContracts ::class )
92
+ inline fun FlowOrMetaDataOrPhrasingContent.fetchLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
93
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
94
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .fetch.realValue), consumer).visit(block)
95
+ }
96
+ @HtmlTagMarker
97
+ @OptIn(ExperimentalContracts ::class )
98
+ inline fun FlowOrMetaDataOrPhrasingContent.fontLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
99
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
100
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .font.realValue), consumer).visit(block)
101
+ }
102
+ @HtmlTagMarker
103
+ @OptIn(ExperimentalContracts ::class )
104
+ inline fun FlowOrMetaDataOrPhrasingContent.imageLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
105
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
106
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .image.realValue), consumer).visit(block)
107
+ }
108
+ @HtmlTagMarker
109
+ @OptIn(ExperimentalContracts ::class )
110
+ inline fun FlowOrMetaDataOrPhrasingContent.htmlObjectLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
111
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
112
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .htmlObject.realValue), consumer).visit(block)
113
+ }
114
+ @HtmlTagMarker
115
+ @OptIn(ExperimentalContracts ::class )
116
+ inline fun FlowOrMetaDataOrPhrasingContent.scriptLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
117
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
118
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .script.realValue), consumer).visit(block)
119
+ }
120
+ @HtmlTagMarker
121
+ @OptIn(ExperimentalContracts ::class )
122
+ inline fun FlowOrMetaDataOrPhrasingContent.styleLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
123
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
124
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .style.realValue), consumer).visit(block)
125
+ }
126
+ @HtmlTagMarker
127
+ @OptIn(ExperimentalContracts ::class )
128
+ inline fun FlowOrMetaDataOrPhrasingContent.trackLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
129
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
130
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .track.realValue), consumer).visit(block)
131
+ }
132
+ @HtmlTagMarker
133
+ @OptIn(ExperimentalContracts ::class )
134
+ inline fun FlowOrMetaDataOrPhrasingContent.videoLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
135
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
136
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .video.realValue), consumer).visit(block)
137
+ }
138
+ @HtmlTagMarker
139
+ @OptIn(ExperimentalContracts ::class )
140
+ inline fun FlowOrMetaDataOrPhrasingContent.workerLink (href : String? = null, rel : String? = null, type : String? = null, crossinline block : LINK .() -> Unit = {}) : Unit {
141
+ contract { callsInPlace(block, InvocationKind .EXACTLY_ONCE ) }
142
+ LINK (attributesMapOf(" href" , href," rel" , rel," type" , type," as" , LinkAs .worker.realValue), consumer).visit(block)
71
143
}
72
144
73
145
/* *
0 commit comments