Struct silkenweb::elements::OptionBuilder[][src]

pub struct OptionBuilder(_);

Implementations

impl OptionBuilder[src]

pub fn id(self, value: impl AttributeValue<String>) -> OptionBuilder[src]

pub fn class(self, value: impl AttributeValue<String>) -> OptionBuilder[src]

pub fn disabled(self, value: impl AttributeValue<bool>) -> OptionBuilder[src]

If set, this option is not checkable. Often browsers grey out such control and it won’t receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled <optgroup> element.

pub fn label(self, value: impl AttributeValue<String>) -> OptionBuilder[src]

This attribute is text for the label indicating the meaning of the option. If the label attribute isn’t defined, its value is that of the element text content.

pub fn selected(self, value: impl AttributeValue<bool>) -> OptionBuilder[src]

If present, indicates that the option is initially selected. If the <option> element is the descendant of a <select> element whose multiple attribute is not set, only one single <option> of this <select> element may have the selected attribute.

pub fn value(self, value: impl AttributeValue<String>) -> OptionBuilder[src]

The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element.

impl OptionBuilder[src]

pub fn on_blur(
    self,
    f: impl FnMut(FocusEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_click(
    self,
    f: impl FnMut(MouseEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_change(
    self,
    f: impl FnMut(Event, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_dblclick(
    self,
    f: impl FnMut(MouseEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_focusout(
    self,
    f: impl FnMut(FocusEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_input(
    self,
    f: impl FnMut(InputEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_keydown(
    self,
    f: impl FnMut(KeyboardEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn on_keyup(
    self,
    f: impl FnMut(KeyboardEvent, HtmlOptionElement) + 'static
) -> OptionBuilder
[src]

pub fn effect(self, f: impl Effect<HtmlOptionElement>) -> OptionBuilder[src]

impl OptionBuilder[src]

pub fn text(self, child: impl Text) -> OptionBuilder[src]

pub fn child<Child>(self, c: Child) -> OptionBuilder where
    Child: Into<Element>, 
[src]

Trait Implementations

impl Builder for OptionBuilder[src]

type Target = Option

impl DomElement for OptionBuilder[src]

impl From<OptionBuilder> for ElementBuilder[src]

impl From<OptionBuilder> for Element[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.