Skip to content

Commit dd9482e

Browse files
committed
add more standard html elements
1 parent 6d49613 commit dd9482e

File tree

1 file changed

+98
-22
lines changed

1 file changed

+98
-22
lines changed

src/idom/html.py

+98-22
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
"""
2-
**External sources**
2+
**Dcument metadata**
33
4+
- :func:`base`
5+
- :func:`head`
46
- :func:`link`
7+
- :func:`meta`
8+
- :func:`style`
9+
- :func:`title`
510
11+
**Content sectioning**
612
7-
**Content Sectioning**
8-
9-
- :func:`style`
13+
- :func:`body`
1014
- :func:`address`
1115
- :func:`article`
1216
- :func:`aside`
1317
- :func:`footer`
18+
- :func:`header`
1419
- :func:`h1`
1520
- :func:`h2`
1621
- :func:`h3`
1722
- :func:`h4`
1823
- :func:`h5`
1924
- :func:`h6`
20-
- :func:`header`
21-
- :func:`hgroup`
25+
- :func:`main`
2226
- :func:`nav`
2327
- :func:`section`
2428
25-
26-
**Text Content**
29+
**Text content**
2730
2831
- :func:`blockquote`
2932
- :func:`dd`
@@ -39,12 +42,13 @@
3942
- :func:`pre`
4043
- :func:`ul`
4144
42-
43-
**Inline Text Semantics**
45+
**Inline text semantics**
4446
4547
- :func:`a`
4648
- :func:`abbr`
4749
- :func:`b`
50+
- :func:`bdi`
51+
- :func:`bdo`
4852
- :func:`br`
4953
- :func:`cite`
5054
- :func:`code`
@@ -54,6 +58,9 @@
5458
- :func:`kbd`
5559
- :func:`mark`
5660
- :func:`q`
61+
- :func:`rp`
62+
- :func:`rt`
63+
- :func:`ruby`
5764
- :func:`s`
5865
- :func:`samp`
5966
- :func:`small`
@@ -64,17 +71,44 @@
6471
- :func:`time`
6572
- :func:`u`
6673
- :func:`var`
67-
74+
- :func:`wbr`
6875
6976
**Image and video**
7077
71-
- :func:`img`
78+
- :func:`area`
7279
- :func:`audio`
80+
- :func:`img`
81+
- :func:`map`
82+
- :func:`track`
7383
- :func:`video`
84+
85+
**Embedded content**
86+
87+
- :func:`embed`
88+
- :func:`iframe`
89+
- :func:`object`
90+
- :func:`param`
91+
- :func:`picture`
92+
- :func:`portal`
7493
- :func:`source`
7594
95+
**SVG and MathML**
96+
97+
- :func:`svg`
98+
- :func:`math`
99+
100+
**Scripting**
101+
102+
- :func:`canvas`
103+
- :func:`noscript`
104+
- :func:`script`
105+
106+
**Demarcating edits**
76107
77-
**Table Content**
108+
- :func:`del_`
109+
- :func:`ins`
110+
111+
**Table content**
78112
79113
- :func:`caption`
80114
- :func:`col`
@@ -87,7 +121,6 @@
87121
- :func:`thead`
88122
- :func:`tr`
89123
90-
91124
**Forms**
92125
93126
- :func:`button`
@@ -103,36 +136,45 @@
103136
- :func:`select`
104137
- :func:`textarea`
105138
106-
107-
**Interactive Elements**
139+
**Interactive elements**
108140
109141
- :func:`details`
110142
- :func:`dialog`
111143
- :func:`menu`
112144
- :func:`menuitem`
113145
- :func:`summary`
146+
147+
**Web components**
148+
149+
- :func:`slot`
150+
- :func:`template`
114151
"""
115152

116153
from .core.vdom import make_vdom_constructor
117154

118155

119-
# External sources
120-
link = make_vdom_constructor("link", allow_children=False)
156+
# Dcument metadata
157+
base = make_vdom_constructor("base")
158+
head = make_vdom_constructor("head")
159+
link = make_vdom_constructor("link")
160+
meta = make_vdom_constructor("meta")
161+
style = make_vdom_constructor("style")
162+
title = make_vdom_constructor("title")
121163

122164
# Content sectioning
123-
style = make_vdom_constructor("style")
165+
body = make_vdom_constructor("body")
124166
address = make_vdom_constructor("address")
125167
article = make_vdom_constructor("article")
126168
aside = make_vdom_constructor("aside")
127169
footer = make_vdom_constructor("footer")
170+
header = make_vdom_constructor("header")
128171
h1 = make_vdom_constructor("h1")
129172
h2 = make_vdom_constructor("h2")
130173
h3 = make_vdom_constructor("h3")
131174
h4 = make_vdom_constructor("h4")
132175
h5 = make_vdom_constructor("h5")
133176
h6 = make_vdom_constructor("h6")
134-
header = make_vdom_constructor("header")
135-
hgroup = make_vdom_constructor("hgroup")
177+
main = make_vdom_constructor("main")
136178
nav = make_vdom_constructor("nav")
137179
section = make_vdom_constructor("section")
138180

@@ -155,6 +197,8 @@
155197
a = make_vdom_constructor("a")
156198
abbr = make_vdom_constructor("abbr")
157199
b = make_vdom_constructor("b")
200+
bdi = make_vdom_constructor("bdi")
201+
bdo = make_vdom_constructor("bdo")
158202
br = make_vdom_constructor("br", allow_children=False)
159203
cite = make_vdom_constructor("cite")
160204
code = make_vdom_constructor("code")
@@ -164,6 +208,9 @@
164208
kbd = make_vdom_constructor("kbd")
165209
mark = make_vdom_constructor("mark")
166210
q = make_vdom_constructor("q")
211+
rp = make_vdom_constructor("rp")
212+
rt = make_vdom_constructor("rt")
213+
ruby = make_vdom_constructor("ruby")
167214
s = make_vdom_constructor("s")
168215
samp = make_vdom_constructor("samp")
169216
small = make_vdom_constructor("small")
@@ -174,13 +221,38 @@
174221
time = make_vdom_constructor("time")
175222
u = make_vdom_constructor("u")
176223
var = make_vdom_constructor("var")
224+
wbr = make_vdom_constructor("wbr")
177225

178226
# Image and video
179-
img = make_vdom_constructor("img", allow_children=False)
227+
area = make_vdom_constructor("area", allow_children=False)
180228
audio = make_vdom_constructor("audio")
229+
img = make_vdom_constructor("img", allow_children=False)
230+
map = make_vdom_constructor("map")
231+
track = make_vdom_constructor("track")
181232
video = make_vdom_constructor("video")
233+
234+
# Embedded content
235+
embed = make_vdom_constructor("embed", allow_children=False)
236+
iframe = make_vdom_constructor("iframe", allow_children=False)
237+
object = make_vdom_constructor("object")
238+
param = make_vdom_constructor("param")
239+
picture = make_vdom_constructor("picture")
240+
portal = make_vdom_constructor("portal", allow_children=False)
182241
source = make_vdom_constructor("source", allow_children=False)
183242

243+
# SVG and MathML
244+
svg = make_vdom_constructor("svg")
245+
math = make_vdom_constructor("math")
246+
247+
# Scripting
248+
canvas = make_vdom_constructor("canvas")
249+
noscript = make_vdom_constructor("noscript")
250+
script = make_vdom_constructor("script")
251+
252+
# Demarcating edits
253+
del_ = make_vdom_constructor("del")
254+
ins = make_vdom_constructor("ins")
255+
184256
# Table content
185257
caption = make_vdom_constructor("caption")
186258
col = make_vdom_constructor("col")
@@ -213,3 +285,7 @@
213285
menu = make_vdom_constructor("menu")
214286
menuitem = make_vdom_constructor("menuitem")
215287
summary = make_vdom_constructor("summary")
288+
289+
# Web components
290+
slot = make_vdom_constructor("slot")
291+
template = make_vdom_constructor("template")

0 commit comments

Comments
 (0)