Skip to main content

main_tag

Function main_tag 

Source
pub fn main_tag() -> Element
Expand description

The dominant content of the body: <main>.

Named main_tag rather than main because a binary crate’s own fn main shadows a glob-imported main(), so main().child(…) fails to compile in exactly the place people write it first. Winged-Swift calls it MainTag for the analogous reason — main is a Swift keyword.

§Examples

use winged_rust::prelude::*;
let el = main_tag();
assert_eq!(el.tag(), "main");