Struct web_sys::HtmlOptionElement 
source · #[repr(transparent)]pub struct HtmlOptionElement { /* private fields */ }Expand description
The HTMLOptionElement object
This API requires the following crate features to be activated: HtmlOptionElement
Implementations§
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn new() -> Result<HtmlOptionElement, JsValue>
 
pub fn new() -> Result<HtmlOptionElement, JsValue>
The new HTMLOptionElement(..) constructor, creating a new instance of HTMLOptionElement
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn new_with_text(text: &str) -> Result<HtmlOptionElement, JsValue>
 
pub fn new_with_text(text: &str) -> Result<HtmlOptionElement, JsValue>
The new HTMLOptionElement(..) constructor, creating a new instance of HTMLOptionElement
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn new_with_text_and_value(
    text: &str,
    value: &str
) -> Result<HtmlOptionElement, JsValue>
 
pub fn new_with_text_and_value(
    text: &str,
    value: &str
) -> Result<HtmlOptionElement, JsValue>
The new HTMLOptionElement(..) constructor, creating a new instance of HTMLOptionElement
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn new_with_text_and_value_and_default_selected(
    text: &str,
    value: &str,
    default_selected: bool
) -> Result<HtmlOptionElement, JsValue>
 
pub fn new_with_text_and_value_and_default_selected(
    text: &str,
    value: &str,
    default_selected: bool
) -> Result<HtmlOptionElement, JsValue>
The new HTMLOptionElement(..) constructor, creating a new instance of HTMLOptionElement
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn new_with_text_and_value_and_default_selected_and_selected(
    text: &str,
    value: &str,
    default_selected: bool,
    selected: bool
) -> Result<HtmlOptionElement, JsValue>
 
pub fn new_with_text_and_value_and_default_selected_and_selected(
    text: &str,
    value: &str,
    default_selected: bool,
    selected: bool
) -> Result<HtmlOptionElement, JsValue>
The new HTMLOptionElement(..) constructor, creating a new instance of HTMLOptionElement
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn set_disabled(&self, disabled: bool)
 
pub fn set_disabled(&self, disabled: bool)
The disabled setter
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn form(&self) -> Option<HtmlFormElement>
 
pub fn form(&self) -> Option<HtmlFormElement>
The form getter
This API requires the following crate features to be activated: HtmlFormElement, HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn default_selected(&self) -> bool
 
pub fn default_selected(&self) -> bool
The defaultSelected getter
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn set_default_selected(&self, default_selected: bool)
 
pub fn set_default_selected(&self, default_selected: bool)
The defaultSelected setter
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
sourcepub fn set_selected(&self, selected: bool)
 
pub fn set_selected(&self, selected: bool)
The selected setter
This API requires the following crate features to be activated: HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
source§impl HtmlOptionElement
 
impl HtmlOptionElement
Trait Implementations§
source§impl AsRef<Element> for HtmlOptionElement
 
impl AsRef<Element> for HtmlOptionElement
source§impl AsRef<EventTarget> for HtmlOptionElement
 
impl AsRef<EventTarget> for HtmlOptionElement
source§fn as_ref(&self) -> &EventTarget
 
fn as_ref(&self) -> &EventTarget
source§impl AsRef<HtmlElement> for HtmlOptionElement
 
impl AsRef<HtmlElement> for HtmlOptionElement
source§fn as_ref(&self) -> &HtmlElement
 
fn as_ref(&self) -> &HtmlElement
source§impl AsRef<JsValue> for HtmlOptionElement
 
impl AsRef<JsValue> for HtmlOptionElement
source§impl AsRef<Node> for HtmlOptionElement
 
impl AsRef<Node> for HtmlOptionElement
source§impl AsRef<Object> for HtmlOptionElement
 
impl AsRef<Object> for HtmlOptionElement
source§impl Clone for HtmlOptionElement
 
impl Clone for HtmlOptionElement
source§fn clone(&self) -> HtmlOptionElement
 
fn clone(&self) -> HtmlOptionElement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for HtmlOptionElement
 
impl Debug for HtmlOptionElement
source§impl From<HtmlOptionElement> for Element
 
impl From<HtmlOptionElement> for Element
source§fn from(obj: HtmlOptionElement) -> Element
 
fn from(obj: HtmlOptionElement) -> Element
source§impl From<HtmlOptionElement> for EventTarget
 
impl From<HtmlOptionElement> for EventTarget
source§fn from(obj: HtmlOptionElement) -> EventTarget
 
fn from(obj: HtmlOptionElement) -> EventTarget
source§impl From<HtmlOptionElement> for HtmlElement
 
impl From<HtmlOptionElement> for HtmlElement
source§fn from(obj: HtmlOptionElement) -> HtmlElement
 
fn from(obj: HtmlOptionElement) -> HtmlElement
source§impl From<HtmlOptionElement> for JsValue
 
impl From<HtmlOptionElement> for JsValue
source§fn from(obj: HtmlOptionElement) -> JsValue
 
fn from(obj: HtmlOptionElement) -> JsValue
source§impl From<HtmlOptionElement> for Node
 
impl From<HtmlOptionElement> for Node
source§fn from(obj: HtmlOptionElement) -> Node
 
fn from(obj: HtmlOptionElement) -> Node
source§impl From<HtmlOptionElement> for Object
 
impl From<HtmlOptionElement> for Object
source§fn from(obj: HtmlOptionElement) -> Object
 
fn from(obj: HtmlOptionElement) -> Object
source§impl From<JsValue> for HtmlOptionElement
 
impl From<JsValue> for HtmlOptionElement
source§fn from(obj: JsValue) -> HtmlOptionElement
 
fn from(obj: JsValue) -> HtmlOptionElement
source§impl FromWasmAbi for HtmlOptionElement
 
impl FromWasmAbi for HtmlOptionElement
source§impl<'a> IntoWasmAbi for &'a HtmlOptionElement
 
impl<'a> IntoWasmAbi for &'a HtmlOptionElement
source§impl IntoWasmAbi for HtmlOptionElement
 
impl IntoWasmAbi for HtmlOptionElement
source§impl JsCast for HtmlOptionElement
 
impl JsCast for HtmlOptionElement
source§fn instanceof(val: &JsValue) -> bool
 
fn instanceof(val: &JsValue) -> bool
instanceof check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
 
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
 
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
    T: JsCast,
 
fn is_instance_of<T>(&self) -> boolwhere
    T: JsCast,
T. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
    T: JsCast,
 
fn dyn_into<T>(self) -> Result<T, Self>where
    T: JsCast,
T. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
    T: JsCast,
 
fn dyn_ref<T>(&self) -> Option<&T>where
    T: JsCast,
T. Read moresource§fn unchecked_into<T>(self) -> Twhere
    T: JsCast,
 
fn unchecked_into<T>(self) -> Twhere
    T: JsCast,
source§impl<'a> OptionIntoWasmAbi for &'a HtmlOptionElement
 
impl<'a> OptionIntoWasmAbi for &'a HtmlOptionElement
source§impl RefFromWasmAbi for HtmlOptionElement
 
impl RefFromWasmAbi for HtmlOptionElement
§type Abi = <JsValue as RefFromWasmAbi>::Abi
 
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self are recovered from.§type Anchor = ManuallyDrop<HtmlOptionElement>
 
type Anchor = ManuallyDrop<HtmlOptionElement>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for HtmlOptionElement
impl !Send for HtmlOptionElement
impl !Sync for HtmlOptionElement
impl Unpin for HtmlOptionElement
impl UnwindSafe for HtmlOptionElement
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
    T: IntoWasmAbi,
 
impl<T> ReturnWasmAbi for Twhere
    T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
 
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abisource§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
 
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err. Read more