pub fn theme_buttons()Expand description
Wires up every [name=theme-button] button on the page: attaches a
click listener that sets data-theme to the clicked button’s
value.
Calling this more than once (e.g. a rerun use_effect) is safe: a
button that’s already wired up is left alone rather than gaining a
duplicate listener.
§Panics
Panics if called outside a browser main-thread context (no window, or
no document on it).