1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
//! HTML offers a selection of elements which help to create interactive user
//! interface objects.
html_element! {
    /// The [HTML Details Element (`<details>`)][mdn] creates a disclosure widget in which
    /// information is visible only when the widget is toggled into an "open" state.
    ///
    /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
    <details>
    categories {
        Flow, Sectioning, Interactive, Palpable
    }
    children {
        tags {
            <summary>
        }
        categories {
            Flow
        }
    }
    attributes {
        /// Indicates whether the details will be shown on page load.
        open(bool)
    }
}
html_element! {
    /// The [HTML `<dialog>` element][mdn] represents a dialog box or other interactive component,
    /// such as an inspector or window.
    ///
    /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
    <dialog>
    categories {
        Flow, Sectioning
    }
    children {
        categories {
            Flow
        }
    }
    attributes {
        /// Indicates that the dialog is active and can be interacted with. When the open attribute
        /// is not set, the dialog shouldn't be shown to the user.
        open(bool)
    }
}
html_element! {
    /// The [HTML `<menu>` element][mdn] represents a group of commands that a user can perform or
    /// activate. This includes both list menus, which might appear across the top of a screen, as
    /// well as context menus, such as those that might appear underneath a button after it has been
    /// clicked.
    ///
    /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu
    <menu>
    categories {
        Flow,
        Palpable // if the element's children include at least one <li> element
    }
    children {
        categories {
            Flow
        }
    }
}
html_element! {
    /// The [HTML Disclosure Summary element (`<summary>`)][mdn] element specifies a summary,
    /// caption, or legend for a [`<details>`][details] element's disclosure box.
    ///
    /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary
    /// [details]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
    <summary>
    children {
        tags {
            <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <hgroup>
        }
        categories {
            Phrasing
        }
    }
}