elements.rs 47 KB

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