pub struct Button<Dom: Dom = DefaultDom, Mutability = Mut>(/* private fields */);
Expand description
The HTML button element
The HTML <button>
element represents a clickable button, which
can be used in forms or anywhere in a document that needs simple,
standard button functionality.
Implementations§
source§impl<Dom: Dom> Button<Dom>
impl<Dom: Dom> Button<Dom>
sourcepub fn autofocus<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<bool>,
pub fn autofocus<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<bool>,
The autofocus
attribute
Specifies that the button should have input focus when the page loads. Only one element in a document can have this attribute.
sourcepub fn disabled<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<bool>,
pub fn disabled<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<bool>,
The disabled
attribute
Prevents the user from interacting with the button: it cannot be pressed or focused.
sourcepub fn form<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
pub fn form<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
The form
attribute
The <form>
element to associate the button with (its form
owner). The value of this attribute must be the id
of a <form>
in the same document. (If this
attribute is not set, the <button>
is associated
with its ancestor <form>
element, if any.)
This attribute lets you associate <button>
elements to
<form>
s anywhere in the document, not just inside
a <form>
. It can also override an ancestor
<form>
element.
sourcepub fn formaction<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
pub fn formaction<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
The formaction
attribute
The URL that processes the information submitted by the button. Overrides the action attribute of the button’s form owner. Does nothing if there is no form owner.
sourcepub fn formenctype<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
pub fn formenctype<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
The formenctype
attribute
If the button is a submit button (it’s inside/associated with a
<form>
and doesn’t have type=“button”), specifies how to
encode the form data that is submitted. Possible values:
- application/x-www-form-urlencoded: The default if the attribute is not used.
- multipart/form-data: Use to submit
<input>
elements with their type attributes set to file. - text/plain: Specified as a debugging aid; shouldn’t be used for real form submission.
If this attribute is specified, it overrides the enctype attribute of the button’s form owner.
sourcepub fn formmethod<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
pub fn formmethod<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
The formmethod
attribute
If the button is a submit button (it’s inside/associated with a
<form>
and doesn’t have type=“button”), this attribute
specifies the HTTP method used to submit the form.
Possible values:
- post: The data from the form are included in the body of the HTTP request when sent to the server. Use when the form contains information that shouldn’t be public, like login credentials.
- get: The form data are appended to the form’s action URL, with a ? as a separator, and the resulting URL is sent to the server. Use this method when the form has no side effects, like search forms.
If specified, this attribute overrides the method attribute of the button’s form owner.
sourcepub fn formnovalidate<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<bool>,
pub fn formnovalidate<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<bool>,
The formnovalidate
attribute
If the button is a submit button, specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button’s form owner.
This attribute is also available on <input type="image">
and
<input type="submit">
elements.
sourcepub fn formtarget<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
pub fn formtarget<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
The formtarget
attribute
If the button is a submit button, this attribute is a
author-defined name or standardized,
underscore-prefixed keyword indicating
where to display the response from submitting the form. This
is the name of, or keyword for, a browsing context (a tab,
window, or <iframe>
). If this attribute is specified, it
overrides the target attribute of the button’s form
owner. The following keywords have special meanings:
- _self: Load the response into the same browsing context as the current one. This is the default if the attribute is not specified.
- _blank: Load the response into a new unnamed browsing context — usually a new tab or window, depending on the user’s browser settings.
- _parent: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self.
- _top: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self.
sourcepub fn name<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
pub fn name<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
The name
attribute
The name of the button, submitted as a pair with the button’s value as part of the form data.
sourcepub fn type<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
pub fn type<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
The type
attribute
The default behavior of the button. Possible values are:
- submit: The button submits the form data to the server. This
is the default if the
attribute is not specified for buttons associated with a
<form>
, or if the attribute is an empty or invalid value. - reset: The button resets all the controls to their initial
values, like
<input type="reset">
. (This behavior tends to annoy users.) - button: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element’s events, which are triggered when the events occur.
sourcepub fn value<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
pub fn value<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
The value
attribute
Defines the value associated with the button’s name when it’s submitted with the form data. This value is passed to the server in params when the form is submitted.
source§impl<InitParam, Dom> Button<Template<InitParam, Dom>>where
Dom: InstantiableDom,
InitParam: 'static,
impl<InitParam, Dom> Button<Template<InitParam, Dom>>where
Dom: InstantiableDom,
InitParam: 'static,
pub fn on_instantiate( self, f: impl 'static + Fn(Button<Dom>, &InitParam) -> Button<Dom> ) -> Self
source§impl<InitParam, Dom> Button<Template<InitParam, Dom>, Const>where
Dom: InstantiableDom,
InitParam: 'static,
impl<InitParam, Dom> Button<Template<InitParam, Dom>, Const>where
Dom: InstantiableDom,
InitParam: 'static,
pub fn instantiate(&self, param: &InitParam) -> Button<Dom>
Trait Implementations§
source§impl<Dom: Dom> AriaElement for Button<Dom>
impl<Dom: Dom> AriaElement for Button<Dom>
source§fn role<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn role<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_activedescendant<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_activedescendant<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_atomic<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_atomic<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_autocomplete<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_autocomplete<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_braillelabel<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_braillelabel<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_brailleroledescription<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_brailleroledescription<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_busy<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_busy<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_checked<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_checked<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_colcount<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<i64>,
fn aria_colcount<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<i64>,
source§fn aria_colindex<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<u64>,
fn aria_colindex<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<u64>,
source§fn aria_colindextext<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_colindextext<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_colspan<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<u64>,
fn aria_colspan<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<u64>,
source§fn aria_controls<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_controls<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_current<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_current<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_describedby<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_describedby<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_description<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_description<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_details<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_details<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_disabled<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_disabled<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_errormessage<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_errormessage<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_expanded<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_expanded<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_flowto<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_flowto<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_haspopup<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_haspopup<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_invalid<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_invalid<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_keyshortcuts<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_keyshortcuts<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_label<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_label<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_labelledby<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_labelledby<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_level<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<u64>,
fn aria_level<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<u64>,
source§fn aria_live<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_live<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_modal<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_modal<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_multiline<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_multiline<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_multiselectable<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_multiselectable<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_orientation<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_orientation<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_owns<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_owns<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_placeholder<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_placeholder<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_posinset<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<u64>,
fn aria_posinset<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<u64>,
source§fn aria_pressed<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_pressed<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_readonly<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_readonly<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_relevant<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_relevant<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_required<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_required<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_roledescription<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_roledescription<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_rowcount<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<i64>,
fn aria_rowcount<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<i64>,
source§fn aria_rowindex<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<u64>,
fn aria_rowindex<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<u64>,
source§fn aria_rowindextext<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_rowindextext<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_rowspan<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<u64>,
fn aria_rowspan<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<u64>,
source§fn aria_selected<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_selected<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_setsize<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<i64>,
fn aria_setsize<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<i64>,
source§fn aria_sort<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn aria_sort<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn aria_valuemax<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<f64>,
fn aria_valuemax<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<f64>,
source§fn aria_valuemin<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<f64>,
fn aria_valuemin<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<f64>,
source§fn aria_valuenow<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<f64>,
fn aria_valuenow<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<f64>,
source§fn aria_valuetext<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn aria_valuetext<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§impl<Dom: Dom> Element for Button<Dom>
impl<Dom: Dom> Element for Button<Dom>
type Dom = Dom
type DomElement = HtmlButtonElement
source§fn class<'a, T>(self, class: impl RefSignalOrValue<'a, Item = T>) -> Self
fn class<'a, T>(self, class: impl RefSignalOrValue<'a, Item = T>) -> Self
source§fn classes<'a, T, Iter>(
self,
classes: impl RefSignalOrValue<'a, Item = Iter>
) -> Self
fn classes<'a, T, Iter>( self, classes: impl RefSignalOrValue<'a, Item = Iter> ) -> Self
source§fn attribute<'a>(
self,
name: &str,
value: impl RefSignalOrValue<'a, Item = impl Attribute>
) -> Self
fn attribute<'a>( self, name: &str, value: impl RefSignalOrValue<'a, Item = impl Attribute> ) -> Self
source§fn style_property<'a>(
self,
name: impl Into<String>,
value: impl RefSignalOrValue<'a, Item = impl AsRef<str> + 'a>
) -> Self
fn style_property<'a>( self, name: impl Into<String>, value: impl RefSignalOrValue<'a, Item = impl AsRef<str> + 'a> ) -> Self
source§fn effect(self, f: impl FnOnce(&Self::DomElement) + 'static) -> Self
fn effect(self, f: impl FnOnce(&Self::DomElement) + 'static) -> Self
source§fn effect_signal<T: 'static>(
self,
sig: impl Signal<Item = T> + 'static,
f: impl Fn(&Self::DomElement, T) + Clone + 'static
) -> Self
fn effect_signal<T: 'static>( self, sig: impl Signal<Item = T> + 'static, f: impl Fn(&Self::DomElement, T) + Clone + 'static ) -> Self
source§fn map_element(self, f: impl FnOnce(&Self::DomElement) + 'static) -> Self
fn map_element(self, f: impl FnOnce(&Self::DomElement) + 'static) -> Self
source§fn map_element_signal<T: 'static>(
self,
sig: impl Signal<Item = T> + 'static,
f: impl Fn(&Self::DomElement, T) + Clone + 'static
) -> Self
fn map_element_signal<T: 'static>( self, sig: impl Signal<Item = T> + 'static, f: impl Fn(&Self::DomElement, T) + Clone + 'static ) -> Self
source§fn handle(&self) -> ElementHandle<Self::Dom, Self::DomElement>
fn handle(&self) -> ElementHandle<Self::Dom, Self::DomElement>
source§impl<Dom: Dom> ElementEvents for Button<Dom>
impl<Dom: Dom> ElementEvents for Button<Dom>
fn on_animationcancel( self, f: impl FnMut(AnimationEvent, Self::DomElement) + 'static ) -> Self
fn on_animationend( self, f: impl FnMut(AnimationEvent, Self::DomElement) + 'static ) -> Self
fn on_animationiteration( self, f: impl FnMut(AnimationEvent, Self::DomElement) + 'static ) -> Self
fn on_animationstart( self, f: impl FnMut(AnimationEvent, Self::DomElement) + 'static ) -> Self
fn on_auxclick( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_blur(self, f: impl FnMut(FocusEvent, Self::DomElement) + 'static) -> Self
fn on_click(self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static) -> Self
fn on_compositionend( self, f: impl FnMut(CompositionEvent, Self::DomElement) + 'static ) -> Self
fn on_compositionstart( self, f: impl FnMut(CompositionEvent, Self::DomElement) + 'static ) -> Self
fn on_compositionupdate( self, f: impl FnMut(CompositionEvent, Self::DomElement) + 'static ) -> Self
fn on_dblclick( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_focusin( self, f: impl FnMut(FocusEvent, Self::DomElement) + 'static ) -> Self
fn on_focusout( self, f: impl FnMut(FocusEvent, Self::DomElement) + 'static ) -> Self
fn on_focus(self, f: impl FnMut(FocusEvent, Self::DomElement) + 'static) -> Self
fn on_fullscreenchange( self, f: impl FnMut(Event, Self::DomElement) + 'static ) -> Self
fn on_fullscreenerror( self, f: impl FnMut(Event, Self::DomElement) + 'static ) -> Self
fn on_gotpointercapture( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_keydown( self, f: impl FnMut(KeyboardEvent, Self::DomElement) + 'static ) -> Self
fn on_keyup( self, f: impl FnMut(KeyboardEvent, Self::DomElement) + 'static ) -> Self
fn on_lostpointercapture( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_mousedown( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_mouseenter( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_mouseleave( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_mousemove( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_mouseout( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_mouseover( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_mouseup( self, f: impl FnMut(MouseEvent, Self::DomElement) + 'static ) -> Self
fn on_pointercancel( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerdown( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerenter( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerleave( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointermove( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerout( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerover( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerrawupdate( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_pointerup( self, f: impl FnMut(PointerEvent, Self::DomElement) + 'static ) -> Self
fn on_transitioncancel( self, f: impl FnMut(TransitionEvent, Self::DomElement) + 'static ) -> Self
fn on_transitionend( self, f: impl FnMut(TransitionEvent, Self::DomElement) + 'static ) -> Self
fn on_transitionrun( self, f: impl FnMut(TransitionEvent, Self::DomElement) + 'static ) -> Self
fn on_transitionstart( self, f: impl FnMut(TransitionEvent, Self::DomElement) + 'static ) -> Self
fn on_scroll(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
fn on_scrollend(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
fn on_securitypolicyviolation( self, f: impl FnMut(SecurityPolicyViolationEvent, Self::DomElement) + 'static ) -> Self
fn on_touchcancel( self, f: impl FnMut(TouchEvent, Self::DomElement) + 'static ) -> Self
fn on_touchend( self, f: impl FnMut(TouchEvent, Self::DomElement) + 'static ) -> Self
fn on_touchmove( self, f: impl FnMut(TouchEvent, Self::DomElement) + 'static ) -> Self
fn on_touchstart( self, f: impl FnMut(TouchEvent, Self::DomElement) + 'static ) -> Self
fn on_wheel(self, f: impl FnMut(WheelEvent, Self::DomElement) + 'static) -> Self
fn on_copy(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
fn on_cut(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
fn on_paste(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
source§impl<Dom: Dom> HtmlElement for Button<Dom>
impl<Dom: Dom> HtmlElement for Button<Dom>
source§fn accesskey<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn accesskey<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn autocapitalize<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn autocapitalize<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn autofocus<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<bool>,
fn autofocus<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<bool>,
source§fn contenteditable<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
fn contenteditable<'a, T>(
self,
value: impl RefSignalOrValue<'a, Item = T>
) -> Selfwhere
T: AsAttribute<String>,
source§fn dir<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn dir<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn draggable<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn draggable<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn enterkeyhint<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn enterkeyhint<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn exportparts<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn exportparts<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn id<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn id<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn inputmode<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn inputmode<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn is<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn is<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn itemid<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn itemid<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn itemprop<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn itemprop<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn itemref<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn itemref<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn itemscope<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn itemscope<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn itemtype<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn itemtype<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn lang<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn lang<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn nonce<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn nonce<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn part<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn part<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn slot<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn slot<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn spellcheck<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn spellcheck<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn style<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn style<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn tabindex<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<i32>,
fn tabindex<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<i32>,
source§fn title<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn title<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§fn translate<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
fn translate<'a, T>(self, value: impl RefSignalOrValue<'a, Item = T>) -> Selfwhere
T: AsAttribute<String>,
source§impl<Dom: Dom> HtmlElementEvents for Button<Dom>
impl<Dom: Dom> HtmlElementEvents for Button<Dom>
fn on_beforeinput( self, f: impl FnMut(InputEvent, Self::DomElement) + 'static ) -> Self
fn on_change(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
fn on_error(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
fn on_input(self, f: impl FnMut(InputEvent, Self::DomElement) + 'static) -> Self
fn on_drag(self, f: impl FnMut(DragEvent, Self::DomElement) + 'static) -> Self
fn on_dragend( self, f: impl FnMut(DragEvent, Self::DomElement) + 'static ) -> Self
fn on_dragenter( self, f: impl FnMut(DragEvent, Self::DomElement) + 'static ) -> Self
fn on_dragleave( self, f: impl FnMut(DragEvent, Self::DomElement) + 'static ) -> Self
fn on_dragover( self, f: impl FnMut(DragEvent, Self::DomElement) + 'static ) -> Self
fn on_dragstart( self, f: impl FnMut(DragEvent, Self::DomElement) + 'static ) -> Self
fn on_drop(self, f: impl FnMut(DragEvent, Self::DomElement) + 'static) -> Self
fn on_load(self, f: impl FnMut(Event, Self::DomElement) + 'static) -> Self
source§impl<Dom: Dom> ParentElement<Dom> for Button<Dom>
impl<Dom: Dom> ParentElement<Dom> for Button<Dom>
source§fn text<'a, T>(self, child: impl RefSignalOrValue<'a, Item = T>) -> Self
fn text<'a, T>(self, child: impl RefSignalOrValue<'a, Item = T>) -> Self
source§fn child(self, child: impl SignalOrValue<Item = impl ChildNode<Dom>>) -> Self
fn child(self, child: impl SignalOrValue<Item = impl ChildNode<Dom>>) -> Self
source§fn optional_child(
self,
child: impl SignalOrValue<Item = Option<impl ChildNode<Dom>>>
) -> Self
fn optional_child( self, child: impl SignalOrValue<Item = Option<impl ChildNode<Dom>>> ) -> Self
source§fn children<N>(self, children: impl IntoIterator<Item = N>) -> Self
fn children<N>(self, children: impl IntoIterator<Item = N>) -> Self
impl<Dom: Dom, Mutability> Value for Button<Dom, Mutability>
Auto Trait Implementations§
impl<Dom, Mutability> Freeze for Button<Dom, Mutability>where
<Dom as Dom>::Element: Freeze,
impl<Dom = Dry, Mutability = Mut> !RefUnwindSafe for Button<Dom, Mutability>
impl<Dom = Dry, Mutability = Mut> !Send for Button<Dom, Mutability>
impl<Dom = Dry, Mutability = Mut> !Sync for Button<Dom, Mutability>
impl<Dom, Mutability> Unpin for Button<Dom, Mutability>
impl<Dom = Dry, Mutability = Mut> !UnwindSafe for Button<Dom, Mutability>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<'a, T> RefSignalOrValue<'a> for Twhere
T: RefValue<'a> + 'a,
impl<'a, T> RefSignalOrValue<'a> for Twhere
T: RefValue<'a> + 'a,
§type Map<'b: 'a, F: FnMut(<T as RefSignalOrValue<'a>>::Item) -> R + 'b, R: RefSignalOrValue<'b, Item = R> + 'b> = R
type Map<'b: 'a, F: FnMut(<T as RefSignalOrValue<'a>>::Item) -> R + 'b, R: RefSignalOrValue<'b, Item = R> + 'b> = R
§type Signal = Always<<T as RefSignalOrValue<'a>>::Item>
type Signal = Always<<T as RefSignalOrValue<'a>>::Item>
Always
for value types.