Struct web_sys::HtmlImageElement
source · #[repr(transparent)]pub struct HtmlImageElement { /* private fields */ }
Expand description
The HTMLImageElement
object
This API requires the following crate features to be activated: HtmlImageElement
Implementations§
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn new() -> Result<HtmlImageElement, JsValue>
pub fn new() -> Result<HtmlImageElement, JsValue>
The new HTMLImageElement(..)
constructor, creating a new instance of HTMLImageElement
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn new_with_width(width: u32) -> Result<HtmlImageElement, JsValue>
pub fn new_with_width(width: u32) -> Result<HtmlImageElement, JsValue>
The new HTMLImageElement(..)
constructor, creating a new instance of HTMLImageElement
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn new_with_width_and_height(
width: u32,
height: u32
) -> Result<HtmlImageElement, JsValue>
pub fn new_with_width_and_height(
width: u32,
height: u32
) -> Result<HtmlImageElement, JsValue>
The new HTMLImageElement(..)
constructor, creating a new instance of HTMLImageElement
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_srcset(&self, srcset: &str)
pub fn set_srcset(&self, srcset: &str)
The srcset
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn cross_origin(&self) -> Option<String>
pub fn cross_origin(&self) -> Option<String>
The crossOrigin
getter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_cross_origin(&self, cross_origin: Option<&str>)
pub fn set_cross_origin(&self, cross_origin: Option<&str>)
The crossOrigin
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_use_map(&self, use_map: &str)
pub fn set_use_map(&self, use_map: &str)
The useMap
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn referrer_policy(&self) -> String
pub fn referrer_policy(&self) -> String
The referrerPolicy
getter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_referrer_policy(&self, referrer_policy: &str)
pub fn set_referrer_policy(&self, referrer_policy: &str)
The referrerPolicy
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_is_map(&self, is_map: bool)
pub fn set_is_map(&self, is_map: bool)
The isMap
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_height(&self, height: u32)
pub fn set_height(&self, height: u32)
The height
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn natural_width(&self) -> u32
pub fn natural_width(&self) -> u32
The naturalWidth
getter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn natural_height(&self) -> u32
pub fn natural_height(&self) -> u32
The naturalHeight
getter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_hspace(&self, hspace: u32)
pub fn set_hspace(&self, hspace: u32)
The hspace
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_vspace(&self, vspace: u32)
pub fn set_vspace(&self, vspace: u32)
The vspace
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_long_desc(&self, long_desc: &str)
pub fn set_long_desc(&self, long_desc: &str)
The longDesc
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn set_border(&self, border: &str)
pub fn set_border(&self, border: &str)
The border
setter
This API requires the following crate features to be activated: HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
source§impl HtmlImageElement
impl HtmlImageElement
sourcepub fn current_src(&self) -> String
pub fn current_src(&self) -> String
The currentSrc
getter
This API requires the following crate features to be activated: HtmlImageElement
Trait Implementations§
source§impl AsRef<Element> for HtmlImageElement
impl AsRef<Element> for HtmlImageElement
source§impl AsRef<EventTarget> for HtmlImageElement
impl AsRef<EventTarget> for HtmlImageElement
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<HtmlElement> for HtmlImageElement
impl AsRef<HtmlElement> for HtmlImageElement
source§fn as_ref(&self) -> &HtmlElement
fn as_ref(&self) -> &HtmlElement
source§impl AsRef<JsValue> for HtmlImageElement
impl AsRef<JsValue> for HtmlImageElement
source§impl AsRef<Node> for HtmlImageElement
impl AsRef<Node> for HtmlImageElement
source§impl AsRef<Object> for HtmlImageElement
impl AsRef<Object> for HtmlImageElement
source§impl Clone for HtmlImageElement
impl Clone for HtmlImageElement
source§fn clone(&self) -> HtmlImageElement
fn clone(&self) -> HtmlImageElement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HtmlImageElement
impl Debug for HtmlImageElement
source§impl From<HtmlImageElement> for Element
impl From<HtmlImageElement> for Element
source§fn from(obj: HtmlImageElement) -> Element
fn from(obj: HtmlImageElement) -> Element
source§impl From<HtmlImageElement> for EventTarget
impl From<HtmlImageElement> for EventTarget
source§fn from(obj: HtmlImageElement) -> EventTarget
fn from(obj: HtmlImageElement) -> EventTarget
source§impl From<HtmlImageElement> for HtmlElement
impl From<HtmlImageElement> for HtmlElement
source§fn from(obj: HtmlImageElement) -> HtmlElement
fn from(obj: HtmlImageElement) -> HtmlElement
source§impl From<HtmlImageElement> for JsValue
impl From<HtmlImageElement> for JsValue
source§fn from(obj: HtmlImageElement) -> JsValue
fn from(obj: HtmlImageElement) -> JsValue
source§impl From<HtmlImageElement> for Node
impl From<HtmlImageElement> for Node
source§fn from(obj: HtmlImageElement) -> Node
fn from(obj: HtmlImageElement) -> Node
source§impl From<HtmlImageElement> for Object
impl From<HtmlImageElement> for Object
source§fn from(obj: HtmlImageElement) -> Object
fn from(obj: HtmlImageElement) -> Object
source§impl From<JsValue> for HtmlImageElement
impl From<JsValue> for HtmlImageElement
source§fn from(obj: JsValue) -> HtmlImageElement
fn from(obj: JsValue) -> HtmlImageElement
source§impl FromWasmAbi for HtmlImageElement
impl FromWasmAbi for HtmlImageElement
source§impl<'a> IntoWasmAbi for &'a HtmlImageElement
impl<'a> IntoWasmAbi for &'a HtmlImageElement
source§impl IntoWasmAbi for HtmlImageElement
impl IntoWasmAbi for HtmlImageElement
source§impl JsCast for HtmlImageElement
impl JsCast for HtmlImageElement
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 OptionFromWasmAbi for HtmlImageElement
impl OptionFromWasmAbi for HtmlImageElement
source§impl<'a> OptionIntoWasmAbi for &'a HtmlImageElement
impl<'a> OptionIntoWasmAbi for &'a HtmlImageElement
source§impl OptionIntoWasmAbi for HtmlImageElement
impl OptionIntoWasmAbi for HtmlImageElement
source§impl RefFromWasmAbi for HtmlImageElement
impl RefFromWasmAbi for HtmlImageElement
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<HtmlImageElement>
type Anchor = ManuallyDrop<HtmlImageElement>
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 HtmlImageElement
impl !Send for HtmlImageElement
impl !Sync for HtmlImageElement
impl Unpin for HtmlImageElement
impl UnwindSafe for HtmlImageElement
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::Abi
source§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