elements.rs 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489
  1. use crate::{GlobalAttributes, SvgAttributes};
  2. use dioxus_core::*;
  3. macro_rules! builder_constructors {
  4. (
  5. $(
  6. $(#[$attr:meta])*
  7. $name:ident {
  8. $(
  9. $(#[$attr_method:meta])*
  10. $fil:ident: $vil:ident,
  11. )*
  12. };
  13. )*
  14. ) => {
  15. $(
  16. #[allow(non_camel_case_types)]
  17. $(#[$attr])*
  18. pub struct $name;
  19. impl DioxusElement for $name {
  20. const TAG_NAME: &'static str = stringify!($name);
  21. const NAME_SPACE: Option<&'static str> = None;
  22. }
  23. impl GlobalAttributes for $name {}
  24. impl $name {
  25. $(
  26. #[allow(non_upper_case_globals)]
  27. pub const $fil: AttributeDiscription = AttributeDiscription{
  28. name: stringify!($fil),
  29. namespace: None,
  30. volatile: false
  31. };
  32. )*
  33. }
  34. )*
  35. };
  36. ( $(
  37. $(#[$attr:meta])*
  38. $name:ident <> $namespace:tt {
  39. $($fil:ident: $vil:ident,)*
  40. };
  41. )* ) => {
  42. $(
  43. #[allow(non_camel_case_types)]
  44. $(#[$attr])*
  45. pub struct $name;
  46. impl DioxusElement for $name {
  47. const TAG_NAME: &'static str = stringify!($name);
  48. const NAME_SPACE: Option<&'static str> = Some($namespace);
  49. }
  50. impl SvgAttributes for $name {}
  51. impl $name {
  52. $(
  53. #[allow(non_upper_case_globals)]
  54. pub const $fil: AttributeDiscription = AttributeDiscription{
  55. name: stringify!($fil),
  56. namespace: Some(stringify!($namespace)),
  57. volatile: false
  58. };
  59. )*
  60. }
  61. )*
  62. };
  63. }
  64. // Organized in the same order as
  65. // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
  66. //
  67. // Does not include obsolete elements.
  68. //
  69. // This namespace represents a collection of modern HTML-5 compatiable elements.
  70. //
  71. // This list does not include obsolete, deprecated, experimental, or poorly supported elements.
  72. builder_constructors! {
  73. // Document metadata
  74. /// Build a
  75. /// [`<base>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base)
  76. /// element.
  77. ///
  78. base {
  79. href: Uri,
  80. target: Target,
  81. };
  82. /// Build a
  83. /// [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)
  84. /// element.
  85. head {};
  86. /// Build a
  87. /// [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
  88. /// element.
  89. link {
  90. // as: Mime,
  91. crossorigin: CrossOrigin,
  92. href: Uri,
  93. hreflang: LanguageTag,
  94. media: String, // FIXME media query
  95. rel: LinkType,
  96. sizes: String, // FIXME
  97. title: String, // FIXME
  98. r#type: Mime,
  99. integrity: String,
  100. };
  101. /// Build a
  102. /// [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta)
  103. /// element.
  104. meta {
  105. charset: String, // FIXME IANA standard names
  106. content: String,
  107. http_equiv: HTTPEquiv,
  108. name: Metadata,
  109. };
  110. /// Build a
  111. /// [`<style>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style)
  112. /// element.
  113. style {
  114. r#type: Mime,
  115. media: String, // FIXME media query
  116. nonce: Nonce,
  117. title: String, // FIXME
  118. };
  119. /// Build a
  120. /// [`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title)
  121. /// element.
  122. title { };
  123. // Sectioning root
  124. /// Build a
  125. /// [`<body>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body)
  126. /// element.
  127. body {};
  128. // ------------------
  129. // Content sectioning
  130. // ------------------
  131. /// Build a
  132. /// [`<address>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address)
  133. /// element.
  134. address {};
  135. /// Build a
  136. /// [`<article>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article)
  137. /// element.
  138. article {};
  139. /// Build a
  140. /// [`<aside>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside)
  141. /// element.
  142. aside {};
  143. /// Build a
  144. /// [`<footer>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer)
  145. /// element.
  146. footer {};
  147. /// Build a
  148. /// [`<header>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header)
  149. /// element.
  150. header {};
  151. /// Build a
  152. /// [`<h1>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h1)
  153. /// element.
  154. ///
  155. /// # About
  156. /// - The HTML `<h1>` element is found within the `<body>` tag.
  157. /// - Headings can range from `<h1>` to `<h6>`.
  158. /// - The most important heading is `<h1>` and the least important heading is `<h6>`.
  159. /// - The `<h1>` heading is the first heading in the document.
  160. /// - The `<h1>` heading is usually a large bolded font.
  161. ///
  162. /// # Usage
  163. ///
  164. /// ```rust, ignore
  165. /// html!(<h1> A header element </h1>)
  166. /// rsx!(h1 { "A header element" })
  167. /// LazyNodes::new(|f| f.el(h1).children([f.text("A header element")]).finish())
  168. /// ```
  169. h1 {};
  170. /// Build a
  171. /// [`<h2>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h2)
  172. /// element.
  173. ///
  174. /// # About
  175. /// - The HTML `<h2>` element is found within the `<body>` tag.
  176. /// - Headings can range from `<h1>` to `<h6>`.
  177. /// - The most important heading is `<h1>` and the least important heading is `<h6>`.
  178. /// - The `<h2>` heading is the second heading in the document.
  179. /// - The `<h2>` heading is usually a large bolded font.
  180. ///
  181. /// # Usage
  182. /// ```rust, ignore
  183. /// html!(<h2> A header element </h2>)
  184. /// rsx!(h2 { "A header element" })
  185. /// LazyNodes::new(|f| f.el(h2).children([f.text("A header element")]).finish())
  186. /// ```
  187. h2 {};
  188. /// Build a
  189. /// [`<h3>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h3)
  190. /// element.
  191. ///
  192. /// # About
  193. /// - The HTML <h1> element is found within the <body> tag.
  194. /// - Headings can range from <h1> to <h6>.
  195. /// - The most important heading is <h1> and the least important heading is <h6>.
  196. /// - The <h1> heading is the first heading in the document.
  197. /// - The <h1> heading is usually a large bolded font.
  198. h3 {};
  199. /// Build a
  200. /// [`<h4>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h4)
  201. /// element.
  202. h4 {};
  203. /// Build a
  204. /// [`<h5>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h5)
  205. /// element.
  206. h5 {};
  207. /// Build a
  208. /// [`<h6>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h6)
  209. /// element.
  210. h6 {};
  211. /// Build a
  212. /// [`<main>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main)
  213. /// element.
  214. main {};
  215. /// Build a
  216. /// [`<nav>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav)
  217. /// element.
  218. nav {};
  219. /// Build a
  220. /// [`<section>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section)
  221. /// element.
  222. section {};
  223. // Text content
  224. /// Build a
  225. /// [`<blockquote>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote)
  226. /// element.
  227. blockquote {
  228. cite: Uri,
  229. };
  230. /// Build a
  231. /// [`<dd>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd)
  232. /// element.
  233. dd {};
  234. /// Build a
  235. /// [`<div>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div)
  236. /// element.
  237. ///
  238. /// Part of the HTML namespace. Only works in HTML-compatible renderers
  239. ///
  240. /// ## Definition and Usage
  241. /// - The <div> tag defines a division or a section in an HTML document.
  242. /// - The <div> tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript.
  243. /// - The <div> tag is easily styled by using the class or id attribute.
  244. /// - Any sort of content can be put inside the <div> tag!
  245. ///
  246. /// Note: By default, browsers always place a line break before and after the <div> element.
  247. ///
  248. /// ## Usage
  249. /// ```rust, ignore
  250. /// html!(<div> A header element </div>)
  251. /// rsx!(div { "A header element" })
  252. /// LazyNodes::new(|f| f.element(div, &[], &[], &[], None))
  253. /// ```
  254. ///
  255. /// ## References:
  256. /// - <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div>
  257. /// - <https://www.w3schools.com/tags/tag_div.asp>
  258. div {};
  259. /// Build a
  260. /// [`<dl>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl)
  261. /// element.
  262. dl {};
  263. /// Build a
  264. /// [`<dt>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt)
  265. /// element.
  266. dt {};
  267. /// Build a
  268. /// [`<figcaption>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption)
  269. /// element.
  270. figcaption {};
  271. /// Build a
  272. /// [`<figure>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure)
  273. /// element.
  274. figure {};
  275. /// Build a
  276. /// [`<hr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)
  277. /// element.
  278. hr {};
  279. /// Build a
  280. /// [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li)
  281. /// element.
  282. li {
  283. value: isize,
  284. };
  285. /// Build a
  286. /// [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol)
  287. /// element.
  288. ol {
  289. reversed: Bool,
  290. start: isize,
  291. r#type: OrderedListType,
  292. };
  293. /// Build a
  294. /// [`<p>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p)
  295. /// element.
  296. p {};
  297. /// Build a
  298. /// [`<pre>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre)
  299. /// element.
  300. pre {};
  301. /// Build a
  302. /// [`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul)
  303. /// element.
  304. ul {};
  305. // Inline text semantics
  306. /// Build a
  307. /// [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
  308. /// element.
  309. a {
  310. download: String,
  311. href: Uri,
  312. hreflang: LanguageTag,
  313. target: Target,
  314. r#type: Mime,
  315. // ping: SpacedList<Uri>,
  316. // rel: SpacedList<LinkType>,
  317. ping: SpacedList,
  318. rel: SpacedList,
  319. };
  320. /// Build a
  321. /// [`<abbr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr)
  322. /// element.
  323. abbr {};
  324. /// Build a
  325. /// [`<b>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b)
  326. /// element.
  327. b {};
  328. /// Build a
  329. /// [`<bdi>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi)
  330. /// element.
  331. bdi {};
  332. /// Build a
  333. /// [`<bdo>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo)
  334. /// element.
  335. bdo {};
  336. /// Build a
  337. /// [`<br>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br)
  338. /// element.
  339. br {};
  340. /// Build a
  341. /// [`<cite>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite)
  342. /// element.
  343. cite {};
  344. /// Build a
  345. /// [`<code>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code)
  346. /// element.
  347. code {
  348. language: String,
  349. };
  350. /// Build a
  351. /// [`<data>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data)
  352. /// element.
  353. data {
  354. value: String,
  355. };
  356. /// Build a
  357. /// [`<dfn>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn)
  358. /// element.
  359. dfn {};
  360. /// Build a
  361. /// [`<em>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em)
  362. /// element.
  363. em {};
  364. /// Build a
  365. /// [`<i>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i)
  366. /// element.
  367. i {};
  368. /// Build a
  369. /// [`<kbd>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd)
  370. /// element.
  371. kbd {};
  372. /// Build a
  373. /// [`<mark>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark)
  374. /// element.
  375. mark {};
  376. /// Build a
  377. /// [`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu)
  378. /// element.
  379. menu {};
  380. /// Build a
  381. /// [`<q>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q)
  382. /// element.
  383. q {
  384. cite: Uri,
  385. };
  386. /// Build a
  387. /// [`<rp>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp)
  388. /// element.
  389. rp {};
  390. /// Build a
  391. /// [`<rt>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt)
  392. /// element.
  393. rt {};
  394. /// Build a
  395. /// [`<ruby>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby)
  396. /// element.
  397. ruby {};
  398. /// Build a
  399. /// [`<s>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s)
  400. /// element.
  401. s {};
  402. /// Build a
  403. /// [`<samp>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp)
  404. /// element.
  405. samp {};
  406. /// Build a
  407. /// [`<small>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small)
  408. /// element.
  409. small {};
  410. /// Build a
  411. /// [`<span>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span)
  412. /// element.
  413. span {};
  414. /// Build a
  415. /// [`<strong>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong)
  416. /// element.
  417. strong {};
  418. /// Build a
  419. /// [`<sub>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub)
  420. /// element.
  421. sub {};
  422. /// Build a
  423. /// [`<sup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup)
  424. /// element.
  425. sup {};
  426. /// Build a
  427. /// [`<time>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time)
  428. /// element.
  429. time {};
  430. /// Build a
  431. /// [`<u>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u)
  432. /// element.
  433. u {};
  434. /// Build a
  435. /// [`<var>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var)
  436. /// element.
  437. var {};
  438. /// Build a
  439. /// [`<wbr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr)
  440. /// element.
  441. wbr {};
  442. // Image and multimedia
  443. /// Build a
  444. /// [`<area>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area)
  445. /// element.
  446. area {
  447. alt: String,
  448. coords: String, // TODO could perhaps be validated
  449. download: Bool,
  450. href: Uri,
  451. hreflang: LanguageTag,
  452. shape: AreaShape,
  453. target: Target,
  454. // ping: SpacedList<Uri>,
  455. // rel: SpacedSet<LinkType>,
  456. };
  457. /// Build a
  458. /// [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio)
  459. /// element.
  460. audio {
  461. autoplay: Bool,
  462. controls: Bool,
  463. crossorigin: CrossOrigin,
  464. muted: Bool,
  465. preload: Preload,
  466. src: Uri,
  467. r#loop: Bool,
  468. };
  469. /// Build a
  470. /// [`<img>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img)
  471. /// element.
  472. img {
  473. alt: String,
  474. crossorigin: CrossOrigin,
  475. decoding: ImageDecoding,
  476. height: usize,
  477. ismap: Bool,
  478. src: Uri,
  479. srcset: String, // FIXME this is much more complicated
  480. usemap: String, // FIXME should be a fragment starting with '#'
  481. width: usize,
  482. referrerpolicy: String,
  483. // sizes: SpacedList<String>, // FIXME it's not really just a string
  484. };
  485. /// Build a
  486. /// [`<map>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map)
  487. /// element.
  488. map {
  489. name: Id,
  490. };
  491. /// Build a
  492. /// [`<track>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track)
  493. /// element.
  494. track {
  495. default: Bool,
  496. kind: VideoKind,
  497. label: String,
  498. src: Uri,
  499. srclang: LanguageTag,
  500. };
  501. /// Build a
  502. /// [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)
  503. /// element.
  504. video {
  505. autoplay: Bool,
  506. controls: Bool,
  507. crossorigin: CrossOrigin,
  508. height: usize,
  509. r#loop: Bool,
  510. muted: Bool,
  511. preload: Preload,
  512. playsinline: Bool,
  513. poster: Uri,
  514. src: Uri,
  515. width: usize,
  516. };
  517. // Embedded content
  518. /// Build a
  519. /// [`<embed>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed)
  520. /// element.
  521. embed {
  522. height: usize,
  523. src: Uri,
  524. r#type: Mime,
  525. width: usize,
  526. };
  527. /// Build a
  528. /// [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
  529. /// element.
  530. iframe {
  531. allow: FeaturePolicy,
  532. allowfullscreen: Bool,
  533. allowpaymentrequest: Bool,
  534. height: usize,
  535. name: Id,
  536. referrerpolicy: ReferrerPolicy,
  537. src: Uri,
  538. srcdoc: Uri,
  539. width: usize,
  540. marginWidth: String,
  541. align: String,
  542. longdesc: String,
  543. scrolling: String,
  544. marginHeight: String,
  545. frameBorder: String,
  546. // sandbox: SpacedSet<Sandbox>,
  547. };
  548. /// Build a
  549. /// [`<object>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object)
  550. /// element.
  551. object {
  552. data: Uri,
  553. form: Id,
  554. height: usize,
  555. name: Id,
  556. r#type: Mime,
  557. typemustmatch: Bool,
  558. usemap: String, // TODO should be a fragment starting with '#'
  559. width: usize,
  560. };
  561. /// Build a
  562. /// [`<param>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/param)
  563. /// element.
  564. param {
  565. name: String,
  566. value: String,
  567. };
  568. /// Build a
  569. /// [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture)
  570. /// element.
  571. picture {};
  572. /// Build a
  573. /// [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source)
  574. /// element.
  575. source {
  576. src: Uri,
  577. r#type: Mime,
  578. };
  579. // Scripting
  580. /// Build a
  581. /// [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas)
  582. /// element.
  583. canvas {
  584. height: usize,
  585. width: usize,
  586. };
  587. /// Build a
  588. /// [`<noscript>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript)
  589. /// element.
  590. noscript {};
  591. /// Build a
  592. /// [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
  593. /// element.
  594. ///
  595. /// The [`script`] HTML element is used to embed executable code or data; this is typically used to embed or refer to
  596. /// JavaScript code. The [`script`] element can also be used with other languages, such as WebGL's GLSL shader
  597. /// programming language and JSON.
  598. script {
  599. /// Normal script elements pass minimal information to the window.onerror for scripts which do not pass the
  600. /// standard CORS checks. To allow error logging for sites which use a separate domain for static media, use
  601. /// this attribute. See CORS settings attributes for a more descriptive explanation of its valid arguments.
  602. crossorigin: CrossOrigin,
  603. /// This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the
  604. /// document has been parsed, but before firing DOMContentLoaded.
  605. ///
  606. /// Scripts with the defer attribute will prevent the DOMContentLoaded event from firing until the script has
  607. /// loaded and finished evaluating.
  608. ///
  609. /// ----
  610. /// ### Warning:
  611. ///
  612. /// This attribute must not be used if the src attribute is absent (i.e. for inline scripts), in this
  613. /// case it would have no effect.
  614. ///
  615. /// ----
  616. ///
  617. /// The defer attribute has no effect on module scripts — they defer by default.
  618. /// Scripts with the defer attribute will execute in the order in which they appear in the document.
  619. ///
  620. /// This attribute allows the elimination of parser-blocking JavaScript where the browser would have to load and
  621. /// evaluate scripts before continuing to parse. async has a similar effect in this case.
  622. defer: Bool,
  623. integrity: Integrity,
  624. nomodule: Bool,
  625. nonce: Nonce,
  626. src: Uri,
  627. text: String,
  628. };
  629. // Demarcating edits
  630. /// Build a
  631. /// [`<del>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del)
  632. /// element.
  633. del {
  634. cite: Uri,
  635. datetime: Datetime,
  636. };
  637. /// Build a
  638. /// [`<ins>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins)
  639. /// element.
  640. ins {
  641. cite: Uri,
  642. datetime: Datetime,
  643. };
  644. // Table content
  645. /// Build a
  646. /// [`<caption>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption)
  647. /// element.
  648. caption {};
  649. /// Build a
  650. /// [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col)
  651. /// element.
  652. col {
  653. span: usize,
  654. };
  655. /// Build a
  656. /// [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup)
  657. /// element.
  658. colgroup {
  659. span: usize,
  660. };
  661. /// Build a
  662. /// [`<table>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table)
  663. /// element.
  664. table {};
  665. /// Build a
  666. /// [`<tbody>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody)
  667. /// element.
  668. tbody {};
  669. /// Build a
  670. /// [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td)
  671. /// element.
  672. td {
  673. colspan: usize,
  674. rowspan: usize,
  675. // headers: SpacedSet<Id>,
  676. };
  677. /// Build a
  678. /// [`<tfoot>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot)
  679. /// element.
  680. tfoot {};
  681. /// Build a
  682. /// [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th)
  683. /// element.
  684. th {
  685. abbr: String,
  686. colspan: usize,
  687. rowspan: usize,
  688. scope: TableHeaderScope,
  689. // headers: SpacedSet<Id>,
  690. };
  691. /// Build a
  692. /// [`<thead>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead)
  693. /// element.
  694. thead {};
  695. /// Build a
  696. /// [`<tr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr)
  697. /// element.
  698. tr {};
  699. // Forms
  700. /// Build a
  701. /// [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button)
  702. /// element.
  703. button {
  704. autofocus: Bool,
  705. disabled: Bool,
  706. form: Id,
  707. formaction: Uri,
  708. formenctype: FormEncodingType,
  709. formmethod: FormMethod,
  710. formnovalidate: Bool,
  711. formtarget: Target,
  712. name: Id,
  713. value: String,
  714. };
  715. /// Build a
  716. /// [`<datalist>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist)
  717. /// element.
  718. datalist {};
  719. /// Build a
  720. /// [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)
  721. /// element.
  722. fieldset {};
  723. /// Build a
  724. /// [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
  725. /// element.
  726. form {
  727. // accept-charset: SpacedList<CharacterEncoding>,
  728. action: Uri,
  729. autocomplete: OnOff,
  730. enctype: FormEncodingType,
  731. method: FormMethod,
  732. name: Id,
  733. novalidate: Bool,
  734. target: Target,
  735. };
  736. /// Build a
  737. /// [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
  738. /// element.
  739. input {
  740. accept: String,
  741. alt: String,
  742. autocomplete: String,
  743. autofocus: Bool,
  744. capture: String,
  745. checked: Bool,
  746. disabled: Bool,
  747. form: Id,
  748. formaction: Uri,
  749. formenctype: FormEncodingType,
  750. formmethod: FormDialogMethod,
  751. formnovalidate: Bool,
  752. formtarget: Target,
  753. height: isize,
  754. list: Id,
  755. max: String,
  756. maxlength: usize,
  757. min: String,
  758. minlength: usize,
  759. multiple: Bool,
  760. name: Id,
  761. pattern: String,
  762. placeholder: String,
  763. readonly: Bool,
  764. required: Bool,
  765. size: usize,
  766. spellcheck: Bool,
  767. src: Uri,
  768. step: String,
  769. tabindex: usize,
  770. width: isize,
  771. // Manual implementations below...
  772. // r#type: InputType,
  773. // value: String,
  774. };
  775. /// Build a
  776. /// [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label)
  777. /// element.
  778. label {
  779. form: Id,
  780. // r#for: Id,
  781. };
  782. /// Build a
  783. /// [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend)
  784. /// element.
  785. legend {};
  786. /// Build a
  787. /// [`<meter>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter)
  788. /// element.
  789. meter {
  790. value: isize,
  791. min: isize,
  792. max: isize,
  793. low: isize,
  794. high: isize,
  795. optimum: isize,
  796. form: Id,
  797. };
  798. /// Build a
  799. /// [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup)
  800. /// element.
  801. optgroup {
  802. disabled: Bool,
  803. label: String,
  804. };
  805. /// Build a
  806. /// [`<option>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
  807. /// element.
  808. option {
  809. disabled: Bool,
  810. label: String,
  811. value: String,
  812. // defined below
  813. // selected: Bool,
  814. };
  815. /// Build a
  816. /// [`<output>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output)
  817. /// element.
  818. output {
  819. form: Id,
  820. name: Id,
  821. // r#for: SpacedSet<Id>,
  822. };
  823. /// Build a
  824. /// [`<progress>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress)
  825. /// element.
  826. progress {
  827. max: f64,
  828. value: f64,
  829. };
  830. /// Build a
  831. /// [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)
  832. /// element.
  833. select {
  834. // defined below
  835. // value: String,
  836. autocomplete: String,
  837. autofocus: Bool,
  838. disabled: Bool,
  839. form: Id,
  840. multiple: Bool,
  841. name: Id,
  842. required: Bool,
  843. size: usize,
  844. };
  845. /// Build a
  846. /// [`<textarea>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea)
  847. /// element.
  848. textarea {
  849. autocomplete: OnOff,
  850. autofocus: Bool,
  851. cols: usize,
  852. disabled: Bool,
  853. form: Id,
  854. maxlength: usize,
  855. minlength: usize,
  856. name: Id,
  857. placeholder: String,
  858. readonly: Bool,
  859. required: Bool,
  860. rows: usize,
  861. spellcheck: BoolOrDefault,
  862. wrap: Wrap,
  863. };
  864. // Interactive elements
  865. /// Build a
  866. /// [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)
  867. /// element.
  868. details {
  869. open: Bool,
  870. };
  871. /// Build dialog
  872. /// [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog)
  873. /// element.
  874. dialog {
  875. open: Bool,
  876. };
  877. /// Build a
  878. /// [`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary)
  879. /// element.
  880. summary {};
  881. // Web components
  882. /// Build a
  883. /// [`<slot>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot)
  884. /// element.
  885. slot {};
  886. /// Build a
  887. /// [`<template>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template)
  888. /// element.
  889. template {};
  890. }
  891. impl input {
  892. /// The type of input
  893. ///
  894. /// Here are the different input types you can use in HTML:
  895. ///
  896. /// - `button`
  897. /// - `checkbox`
  898. /// - `color`
  899. /// - `date`
  900. /// - `datetime-local`
  901. /// - `email`
  902. /// - `file`
  903. /// - `hidden`
  904. /// - `image`
  905. /// - `month`
  906. /// - `number`
  907. /// - `password`
  908. /// - `radio`
  909. /// - `range`
  910. /// - `reset`
  911. /// - `search`
  912. /// - `submit`
  913. /// - `tel`
  914. /// - `text`
  915. /// - `time`
  916. /// - `url`
  917. /// - `week`
  918. #[allow(non_upper_case_globals)]
  919. pub const r#type: AttributeDiscription = AttributeDiscription {
  920. name: "type",
  921. namespace: None,
  922. volatile: false,
  923. };
  924. #[allow(non_upper_case_globals)]
  925. pub const value: AttributeDiscription = AttributeDiscription {
  926. name: "value",
  927. namespace: None,
  928. volatile: true,
  929. };
  930. }
  931. /*
  932. volatile attributes
  933. */
  934. impl script {
  935. // r#async: Bool,
  936. // r#type: String, // TODO could be an enum
  937. #[allow(non_upper_case_globals)]
  938. pub const r#type: AttributeDiscription = AttributeDiscription {
  939. name: "type",
  940. namespace: None,
  941. volatile: false,
  942. };
  943. #[allow(non_upper_case_globals)]
  944. pub const r#script: AttributeDiscription = AttributeDiscription {
  945. name: "script",
  946. namespace: None,
  947. volatile: false,
  948. };
  949. }
  950. impl button {
  951. #[allow(non_upper_case_globals)]
  952. pub const r#type: AttributeDiscription = AttributeDiscription {
  953. name: "type",
  954. namespace: None,
  955. volatile: false,
  956. };
  957. }
  958. impl select {
  959. #[allow(non_upper_case_globals)]
  960. pub const value: AttributeDiscription = AttributeDiscription {
  961. name: "value",
  962. namespace: None,
  963. volatile: true,
  964. };
  965. }
  966. impl option {
  967. #[allow(non_upper_case_globals)]
  968. pub const selected: AttributeDiscription = AttributeDiscription {
  969. name: "selected",
  970. namespace: None,
  971. volatile: true,
  972. };
  973. }
  974. impl textarea {
  975. #[allow(non_upper_case_globals)]
  976. pub const value: AttributeDiscription = AttributeDiscription {
  977. name: "value",
  978. namespace: None,
  979. volatile: true,
  980. };
  981. }
  982. impl label {
  983. #[allow(non_upper_case_globals)]
  984. pub const r#for: AttributeDiscription = AttributeDiscription {
  985. name: "for",
  986. namespace: None,
  987. volatile: false,
  988. };
  989. }
  990. builder_constructors! {
  991. // SVG components
  992. /// Build a
  993. /// [`<svg>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg)
  994. /// element.
  995. svg <> "http://www.w3.org/2000/svg" { };
  996. // /// Build a
  997. // /// [`<a>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a)
  998. // /// element.
  999. // a <> "http://www.w3.org/2000/svg" {};
  1000. /// Build a
  1001. /// [`<animate>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate)
  1002. /// element.
  1003. animate <> "http://www.w3.org/2000/svg" {};
  1004. /// Build a
  1005. /// [`<animateMotion>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animateMotion)
  1006. /// element.
  1007. animateMotion <> "http://www.w3.org/2000/svg" {};
  1008. /// Build a
  1009. /// [`<animateTransform>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animateTransform)
  1010. /// element.
  1011. animateTransform <> "http://www.w3.org/2000/svg" {};
  1012. /// Build a
  1013. /// [`<circle>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle)
  1014. /// element.
  1015. circle <> "http://www.w3.org/2000/svg" {};
  1016. /// Build a
  1017. /// [`<clipPath>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/clipPath)
  1018. /// element.
  1019. clipPath <> "http://www.w3.org/2000/svg" {};
  1020. /// Build a
  1021. /// [`<defs>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs)
  1022. /// element.
  1023. defs <> "http://www.w3.org/2000/svg" {};
  1024. /// Build a
  1025. /// [`<desc>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc)
  1026. /// element.
  1027. desc <> "http://www.w3.org/2000/svg" {};
  1028. /// Build a
  1029. /// [`<discard>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/discard)
  1030. /// element.
  1031. discard <> "http://www.w3.org/2000/svg" {};
  1032. /// Build a
  1033. /// [`<ellipse>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/ellipse)
  1034. /// element.
  1035. ellipse <> "http://www.w3.org/2000/svg" {};
  1036. /// Build a
  1037. /// [`<feBlend>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feBlend)
  1038. /// element.
  1039. feBlend <> "http://www.w3.org/2000/svg" {};
  1040. /// Build a
  1041. /// [`<feColorMatrix>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feColorMatrix)
  1042. /// element.
  1043. feColorMatrix <> "http://www.w3.org/2000/svg" {};
  1044. /// Build a
  1045. /// [`<feComponentTransfer>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feComponentTransfer)
  1046. /// element.
  1047. feComponentTransfer <> "http://www.w3.org/2000/svg" {};
  1048. /// Build a
  1049. /// [`<feComposite>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feComposite)
  1050. /// element.
  1051. feComposite <> "http://www.w3.org/2000/svg" {};
  1052. /// Build a
  1053. /// [`<feConvolveMatrix>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feConvolveMatrix)
  1054. /// element.
  1055. feConvolveMatrix <> "http://www.w3.org/2000/svg" {};
  1056. /// Build a
  1057. /// [`<feDiffuseLighting>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDiffuseLighting)
  1058. /// element.
  1059. feDiffuseLighting <> "http://www.w3.org/2000/svg" {};
  1060. /// Build a
  1061. /// [`<feDisplacementMap>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDisplacementMap)
  1062. /// element.
  1063. feDisplacementMap <> "http://www.w3.org/2000/svg" {};
  1064. /// Build a
  1065. /// [`<feDistantLight>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDistantLight)
  1066. /// element.
  1067. feDistantLight <> "http://www.w3.org/2000/svg" {};
  1068. /// Build a
  1069. /// [`<feDropShadow>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDropShadow)
  1070. /// element.
  1071. feDropShadow <> "http://www.w3.org/2000/svg" {};
  1072. /// Build a
  1073. /// [`<feFlood>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feFlood)
  1074. /// element.
  1075. feFlood <> "http://www.w3.org/2000/svg" {};
  1076. /// Build a
  1077. /// [`<feFuncA>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feFuncA)
  1078. /// element.
  1079. feFuncA <> "http://www.w3.org/2000/svg" {};
  1080. /// Build a
  1081. /// [`<feFuncB>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feFuncB)
  1082. /// element.
  1083. feFuncB <> "http://www.w3.org/2000/svg" {};
  1084. /// Build a
  1085. /// [`<feFuncG>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feFuncG)
  1086. /// element.
  1087. feFuncG <> "http://www.w3.org/2000/svg" {};
  1088. /// Build a
  1089. /// [`<feFuncR>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feFuncR)
  1090. /// element.
  1091. feFuncR <> "http://www.w3.org/2000/svg" {};
  1092. /// Build a
  1093. /// [`<feGaussianBlur>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feGaussianBlur)
  1094. /// element.
  1095. feGaussianBlur <> "http://www.w3.org/2000/svg" {};
  1096. /// Build a
  1097. /// [`<feImage>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feImage)
  1098. /// element.
  1099. feImage <> "http://www.w3.org/2000/svg" {};
  1100. /// Build a
  1101. /// [`<feMerge>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feMerge)
  1102. /// element.
  1103. feMerge <> "http://www.w3.org/2000/svg" {};
  1104. /// Build a
  1105. /// [`<feMergeNode>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feMergeNode)
  1106. /// element.
  1107. feMergeNode <> "http://www.w3.org/2000/svg" {};
  1108. /// Build a
  1109. /// [`<feMorphology>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feMorphology)
  1110. /// element.
  1111. feMorphology <> "http://www.w3.org/2000/svg" {};
  1112. /// Build a
  1113. /// [`<feOffset>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feOffset)
  1114. /// element.
  1115. feOffset <> "http://www.w3.org/2000/svg" {};
  1116. /// Build a
  1117. /// [`<fePointLight>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/fePointLight)
  1118. /// element.
  1119. fePointLight <> "http://www.w3.org/2000/svg" {};
  1120. /// Build a
  1121. /// [`<feSpecularLighting>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feSpecularLighting)
  1122. /// element.
  1123. feSpecularLighting <> "http://www.w3.org/2000/svg" {};
  1124. /// Build a
  1125. /// [`<feSpotLight>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feSpotLight)
  1126. /// element.
  1127. feSpotLight <> "http://www.w3.org/2000/svg" {};
  1128. /// Build a
  1129. /// [`<feTile>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feTile)
  1130. /// element.
  1131. feTile <> "http://www.w3.org/2000/svg" {};
  1132. /// Build a
  1133. /// [`<feTurbulence>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feTurbulence)
  1134. /// element.
  1135. feTurbulence <> "http://www.w3.org/2000/svg" {};
  1136. /// Build a
  1137. /// [`<filter>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/filter)
  1138. /// element.
  1139. filter <> "http://www.w3.org/2000/svg" {};
  1140. /// Build a
  1141. /// [`<foreignObject>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject)
  1142. /// element.
  1143. foreignObject <> "http://www.w3.org/2000/svg" {};
  1144. /// Build a
  1145. /// [`<g>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g)
  1146. /// element.
  1147. g <> "http://www.w3.org/2000/svg" {};
  1148. /// Build a
  1149. /// [`<hatch>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/hatch)
  1150. /// element.
  1151. hatch <> "http://www.w3.org/2000/svg" {};
  1152. /// Build a
  1153. /// [`<hatchpath>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/hatchpath)
  1154. /// element.
  1155. hatchpath <> "http://www.w3.org/2000/svg" {};
  1156. // /// Build a
  1157. // /// [`<image>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/image)
  1158. // /// element.
  1159. // image <> "http://www.w3.org/2000/svg" {};
  1160. /// Build a
  1161. /// [`<line>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/line)
  1162. /// element.
  1163. line <> "http://www.w3.org/2000/svg" {};
  1164. /// Build a
  1165. /// [`<linearGradient>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient)
  1166. /// element.
  1167. linearGradient <> "http://www.w3.org/2000/svg" {};
  1168. /// Build a
  1169. /// [`<marker>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker)
  1170. /// element.
  1171. marker <> "http://www.w3.org/2000/svg" {};
  1172. /// Build a
  1173. /// [`<mask>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/mask)
  1174. /// element.
  1175. mask <> "http://www.w3.org/2000/svg" {};
  1176. /// Build a
  1177. /// [`<metadata>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/metadata)
  1178. /// element.
  1179. metadata <> "http://www.w3.org/2000/svg" {};
  1180. /// Build a
  1181. /// [`<mpath>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/mpath)
  1182. /// element.
  1183. mpath <> "http://www.w3.org/2000/svg" {};
  1184. /// Build a
  1185. /// [`<path>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path)
  1186. /// element.
  1187. path <> "http://www.w3.org/2000/svg" {};
  1188. /// Build a
  1189. /// [`<pattern>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/pattern)
  1190. /// element.
  1191. pattern <> "http://www.w3.org/2000/svg" {};
  1192. /// Build a
  1193. /// [`<polygon>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon)
  1194. /// element.
  1195. polygon <> "http://www.w3.org/2000/svg" {};
  1196. /// Build a
  1197. /// [`<polyline>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polyline)
  1198. /// element.
  1199. polyline <> "http://www.w3.org/2000/svg" {};
  1200. /// Build a
  1201. /// [`<radialGradient>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradient)
  1202. /// element.
  1203. radialGradient <> "http://www.w3.org/2000/svg" {};
  1204. /// Build a
  1205. /// [`<rect>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/rect)
  1206. /// element.
  1207. rect <> "http://www.w3.org/2000/svg" {};
  1208. // /// Build a
  1209. // /// [`<script>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script)
  1210. // /// element.
  1211. // script <> "http://www.w3.org/2000/svg" {};
  1212. /// Build a
  1213. /// [`<set>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/set)
  1214. /// element.
  1215. set <> "http://www.w3.org/2000/svg" {};
  1216. /// Build a
  1217. /// [`<stop>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/stop)
  1218. /// element.
  1219. stop <> "http://www.w3.org/2000/svg" {};
  1220. // /// Build a
  1221. // /// [`<style>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/style)
  1222. // /// element.
  1223. // style <> "http://www.w3.org/2000/svg" {};
  1224. // /// Build a
  1225. // /// [`<svg>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg)
  1226. // /// element.
  1227. // svg <> "http://www.w3.org/2000/svg" {};
  1228. /// Build a
  1229. /// [`<switch>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/switch)
  1230. /// element.
  1231. switch <> "http://www.w3.org/2000/svg" {};
  1232. /// Build a
  1233. /// [`<symbol>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol)
  1234. /// element.
  1235. symbol <> "http://www.w3.org/2000/svg" {};
  1236. /// Build a
  1237. /// [`<text>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text)
  1238. /// element.
  1239. text <> "http://www.w3.org/2000/svg" {};
  1240. /// Build a
  1241. /// [`<textPath>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/textPath)
  1242. /// element.
  1243. textPath <> "http://www.w3.org/2000/svg" {};
  1244. // /// Build a
  1245. // /// [`<title>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title)
  1246. // /// element.
  1247. // title <> "http://www.w3.org/2000/svg" {};
  1248. /// Build a
  1249. /// [`<tspan>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/tspan)
  1250. /// element.
  1251. tspan <> "http://www.w3.org/2000/svg" {};
  1252. /// Build a
  1253. /// [`<view>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/view)
  1254. /// element.
  1255. view <> "http://www.w3.org/2000/svg" {};
  1256. // /// Build a
  1257. // /// [`<use>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use)
  1258. // /// element.
  1259. // use <> "http://www.w3.org/2000/svg" {};
  1260. }