@@ -52,10 +52,8 @@ pub struct Listener<'a> {
52/// `href="https://example.com"`.
52/// `href="https://example.com"`.
53#[derive(Clone, Debug)]
53#[derive(Clone, Debug)]
54pub struct Attribute<'a> {
54pub struct Attribute<'a> {
55− /// The attribute name, such as `id`.
56− pub name: &'a str,
55+ pub(crate) name: &'a str,
57− /// The attribute value, such as `"my-thing"`.
58− pub value: &'a str,
56+ pub(crate) value: &'a str,
61impl fmt::Debug for Listener<'_> {
59impl fmt::Debug for Listener<'_> {
@@ -71,6 +69,18 @@ impl fmt::Debug for Listener<'_> {
73impl<'a> Attribute<'a> {
71impl<'a> Attribute<'a> {
72+ /// Get this attribute's name, such as `"id"` in `<div id="my-thing" />`.
74+ pub fn name(&self) -> &'a str {
78+ /// The attribute value, such as `"my-thing"` in `<div id="my-thing" />`.
80+ pub fn value(&self) -> &'a str {
74 /// Certain attributes are considered "volatile" and can change via user
84 /// Certain attributes are considered "volatile" and can change via user
75 /// input that we can't see when diffing against the old virtual DOM. For
85 /// input that we can't see when diffing against the old virtual DOM. For
76 /// these attributes, we want to always re-set the attribute on the physical
86 /// these attributes, we want to always re-set the attribute on the physical