Struct SVGElementTagNameMap

Source
pub struct SVGElementTagNameMap(/* private fields */);

Implementations§

Source§

impl SVGElementTagNameMap

Source

pub fn get_view(&self) -> SVGViewElement

Source

pub fn set_view(&self, value: &SVGViewElement)

Source

pub fn get_use(&self) -> SVGUseElement

Source

pub fn set_use(&self, value: &SVGUseElement)

Source

pub fn get_tspan(&self) -> SVGTSpanElement

Source

pub fn set_tspan(&self, value: &SVGTSpanElement)

Source

pub fn get_title(&self) -> SVGTitleElement

Source

pub fn set_title(&self, value: &SVGTitleElement)

Source

pub fn get_text_path(&self) -> SVGTextPathElement

Source

pub fn set_text_path(&self, value: &SVGTextPathElement)

Source

pub fn get_text(&self) -> SVGTextElement

Source

pub fn set_text(&self, value: &SVGTextElement)

Source

pub fn get_symbol(&self) -> SVGSymbolElement

Source

pub fn set_symbol(&self, value: &SVGSymbolElement)

Source

pub fn get_switch(&self) -> SVGSwitchElement

Source

pub fn set_switch(&self, value: &SVGSwitchElement)

Source

pub fn get_svg(&self) -> SVGSVGElement

Source

pub fn set_svg(&self, value: &SVGSVGElement)

Source

pub fn get_style(&self) -> SVGStyleElement

Source

pub fn set_style(&self, value: &SVGStyleElement)

Source

pub fn get_stop(&self) -> SVGStopElement

Source

pub fn set_stop(&self, value: &SVGStopElement)

Source

pub fn get_set(&self) -> SVGSetElement

Source

pub fn set_set(&self, value: &SVGSetElement)

Source

pub fn get_script(&self) -> SVGScriptElement

Source

pub fn set_script(&self, value: &SVGScriptElement)

Source

pub fn get_rect(&self) -> SVGRectElement

Source

pub fn set_rect(&self, value: &SVGRectElement)

Source

pub fn get_radial_gradient(&self) -> SVGRadialGradientElement

Source

pub fn set_radial_gradient(&self, value: &SVGRadialGradientElement)

Source

pub fn get_polyline(&self) -> SVGPolylineElement

Source

pub fn set_polyline(&self, value: &SVGPolylineElement)

Source

pub fn get_polygon(&self) -> SVGPolygonElement

Source

pub fn set_polygon(&self, value: &SVGPolygonElement)

Source

pub fn get_pattern(&self) -> SVGPatternElement

Source

pub fn set_pattern(&self, value: &SVGPatternElement)

Source

pub fn get_path(&self) -> SVGPathElement

Source

pub fn set_path(&self, value: &SVGPathElement)

Source

pub fn get_mpath(&self) -> SVGMPathElement

Source

pub fn set_mpath(&self, value: &SVGMPathElement)

Source

pub fn get_metadata(&self) -> SVGMetadataElement

Source

pub fn set_metadata(&self, value: &SVGMetadataElement)

Source

pub fn get_mask(&self) -> SVGMaskElement

Source

pub fn set_mask(&self, value: &SVGMaskElement)

Source

pub fn get_marker(&self) -> SVGMarkerElement

Source

pub fn set_marker(&self, value: &SVGMarkerElement)

Source

pub fn get_linear_gradient(&self) -> SVGLinearGradientElement

Source

pub fn set_linear_gradient(&self, value: &SVGLinearGradientElement)

Source

pub fn get_line(&self) -> SVGLineElement

Source

pub fn set_line(&self, value: &SVGLineElement)

Source

pub fn get_image(&self) -> SVGImageElement

Source

pub fn set_image(&self, value: &SVGImageElement)

Source

pub fn get_g(&self) -> SVGGElement

Source

pub fn set_g(&self, value: &SVGGElement)

Source

pub fn get_foreign_object(&self) -> SVGForeignObjectElement

Source

pub fn set_foreign_object(&self, value: &SVGForeignObjectElement)

Source

pub fn get_filter(&self) -> SVGFilterElement

Source

pub fn set_filter(&self, value: &SVGFilterElement)

Source

pub fn get_fe_turbulence(&self) -> SVGFETurbulenceElement

Source

pub fn set_fe_turbulence(&self, value: &SVGFETurbulenceElement)

Source

pub fn get_fe_tile(&self) -> SVGFETileElement

Source

pub fn set_fe_tile(&self, value: &SVGFETileElement)

Source

pub fn get_fe_spot_light(&self) -> SVGFESpotLightElement

Source

pub fn set_fe_spot_light(&self, value: &SVGFESpotLightElement)

Source

pub fn get_fe_specular_lighting(&self) -> SVGFESpecularLightingElement

Source

pub fn set_fe_specular_lighting(&self, value: &SVGFESpecularLightingElement)

Source

pub fn get_fe_point_light(&self) -> SVGFEPointLightElement

Source

pub fn set_fe_point_light(&self, value: &SVGFEPointLightElement)

Source

pub fn get_fe_offset(&self) -> SVGFEOffsetElement

Source

pub fn set_fe_offset(&self, value: &SVGFEOffsetElement)

Source

pub fn get_fe_morphology(&self) -> SVGFEMorphologyElement

Source

pub fn set_fe_morphology(&self, value: &SVGFEMorphologyElement)

Source

pub fn get_fe_merge_node(&self) -> SVGFEMergeNodeElement

Source

pub fn set_fe_merge_node(&self, value: &SVGFEMergeNodeElement)

Source

pub fn get_fe_merge(&self) -> SVGFEMergeElement

Source

pub fn set_fe_merge(&self, value: &SVGFEMergeElement)

Source

pub fn get_fe_image(&self) -> SVGFEImageElement

Source

pub fn set_fe_image(&self, value: &SVGFEImageElement)

Source

pub fn get_fe_gaussian_blur(&self) -> SVGFEGaussianBlurElement

Source

pub fn set_fe_gaussian_blur(&self, value: &SVGFEGaussianBlurElement)

Source

pub fn get_fe_func_r(&self) -> SVGFEFuncRElement

Source

pub fn set_fe_func_r(&self, value: &SVGFEFuncRElement)

Source

pub fn get_fe_func_g(&self) -> SVGFEFuncGElement

Source

pub fn set_fe_func_g(&self, value: &SVGFEFuncGElement)

Source

pub fn get_fe_func_b(&self) -> SVGFEFuncBElement

Source

pub fn set_fe_func_b(&self, value: &SVGFEFuncBElement)

Source

pub fn get_fe_func_a(&self) -> SVGFEFuncAElement

Source

pub fn set_fe_func_a(&self, value: &SVGFEFuncAElement)

Source

pub fn get_fe_flood(&self) -> SVGFEFloodElement

Source

pub fn set_fe_flood(&self, value: &SVGFEFloodElement)

Source

pub fn get_fe_drop_shadow(&self) -> SVGFEDropShadowElement

Source

pub fn set_fe_drop_shadow(&self, value: &SVGFEDropShadowElement)

Source

pub fn get_fe_distant_light(&self) -> SVGFEDistantLightElement

Source

pub fn set_fe_distant_light(&self, value: &SVGFEDistantLightElement)

Source

pub fn get_fe_displacement_map(&self) -> SVGFEDisplacementMapElement

Source

pub fn set_fe_displacement_map(&self, value: &SVGFEDisplacementMapElement)

Source

pub fn get_fe_diffuse_lighting(&self) -> SVGFEDiffuseLightingElement

Source

pub fn set_fe_diffuse_lighting(&self, value: &SVGFEDiffuseLightingElement)

Source

pub fn get_fe_convolve_matrix(&self) -> SVGFEConvolveMatrixElement

Source

pub fn set_fe_convolve_matrix(&self, value: &SVGFEConvolveMatrixElement)

Source

pub fn get_fe_composite(&self) -> SVGFECompositeElement

Source

pub fn set_fe_composite(&self, value: &SVGFECompositeElement)

Source

pub fn get_fe_component_transfer(&self) -> SVGFEComponentTransferElement

Source

pub fn set_fe_component_transfer(&self, value: &SVGFEComponentTransferElement)

Source

pub fn get_fe_color_matrix(&self) -> SVGFEColorMatrixElement

Source

pub fn set_fe_color_matrix(&self, value: &SVGFEColorMatrixElement)

Source

pub fn get_fe_blend(&self) -> SVGFEBlendElement

Source

pub fn set_fe_blend(&self, value: &SVGFEBlendElement)

Source

pub fn get_ellipse(&self) -> SVGEllipseElement

Source

pub fn set_ellipse(&self, value: &SVGEllipseElement)

Source

pub fn get_desc(&self) -> SVGDescElement

Source

pub fn set_desc(&self, value: &SVGDescElement)

Source

pub fn get_defs(&self) -> SVGDefsElement

Source

pub fn set_defs(&self, value: &SVGDefsElement)

Source

pub fn get_clip_path(&self) -> SVGClipPathElement

Source

pub fn set_clip_path(&self, value: &SVGClipPathElement)

Source

pub fn get_circle(&self) -> SVGCircleElement

Source

pub fn set_circle(&self, value: &SVGCircleElement)

Source

pub fn get_animate_transform(&self) -> SVGAnimateTransformElement

Source

pub fn set_animate_transform(&self, value: &SVGAnimateTransformElement)

Source

pub fn get_animate_motion(&self) -> SVGAnimateMotionElement

Source

pub fn set_animate_motion(&self, value: &SVGAnimateMotionElement)

Source

pub fn get_animate(&self) -> SVGAnimateElement

Source

pub fn set_animate(&self, value: &SVGAnimateElement)

Source

pub fn get_a(&self) -> SVGAElement

Source

pub fn set_a(&self, value: &SVGAElement)

Methods from Deref<Target = JsObject>§

Source

pub fn js_get_field(&self, property: &dyn UseInJsCode) -> JsValue

Get a field value of in this object.

WSDOM provides built-in getters so you should use that instead when possible.

Use js_get_field only when needed

fn example(browser: Browser) {
    // you can get `window["location"]["href"]` like this
    let href: JsValue = wsdom::dom::location(&browser).js_get_field(&"href");

    // but you should use built-in getters instead
    let href: JsString = wsdom::dom::location(&browser).get_href();
}
Source

pub fn js_set_field(&self, property: &dyn UseInJsCode, value: &dyn UseInJsCode)

Set a field value of in this object.

WSDOM provides built-in setters so you should use that instead when possible.

Use js_set_field only when needed

fn example(browser: Browser) {
    // you can set `window["location"]["href"]` like this
    wsdom::dom::location(&browser).js_set_field(&"href", &"https://example.com/");

    // but you should use built-in setters instead
    wsdom::dom::location(&browser).set_href(&"https://example.com");
}
Source

pub fn js_call_method<'a>( &'a self, method_name: &'a str, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue

Call a method on this object.

Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.

fn example(browser: &Browser) {
    let console = wsdom::dom::console(browser);
    // you can call console.log like this
    console.js_call_method("log", [&"hello" as &_], false);
     
    // but the better way is to use
    wsdom::dom::console(&browser).log(&[&"Hello" as &_]);
}

Be aware that the first argument (method_name) is NOT escaped.

Set last_arg_variadic to true if you want to “spread” the last argument as obj.method(arg1, arg2, ...arg3).

Source

pub fn js_call_self<'a>( &'a self, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue

Call this object: obj().

Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.

Methods from Deref<Target = JsValue>§

Source

pub fn browser(&self) -> &Browser

Source

pub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>

Retrive this value from the JS side to the Rust side. Returns Future whose output is a serde_json::Value.

§use wsdom::dom::Browser
§use wsdom::dom::HTMLInputElement;

async fn example(input: &HTMLInputElement) { let _val = input.get_value().retrieve_json().await; }

Trait Implementations§

Source§

impl AsRef<JsObject> for SVGElementTagNameMap

Source§

fn as_ref(&self) -> &JsObject

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<JsValue> for SVGElementTagNameMap

Source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<SVGElementTagNameMap> for SVGElementTagNameMap

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for SVGElementTagNameMap

Source§

fn clone(&self) -> SVGElementTagNameMap

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for SVGElementTagNameMap

Source§

type Target = JsObject

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Into<JsObject> for SVGElementTagNameMap

Source§

fn into(self) -> JsObject

Converts this type into the (usually inferred) input type.
Source§

impl Into<JsValue> for SVGElementTagNameMap

Source§

fn into(self) -> JsValue

Converts this type into the (usually inferred) input type.
Source§

impl JsCast for SVGElementTagNameMap

Source§

fn unchecked_from_js(val: JsValue) -> Self

Source§

fn unchecked_from_js_ref(val: &JsValue) -> &Self

Source§

fn unchecked_into<T>(self) -> T
where T: JsCast,

Source§

fn unchecked_ref<T>(&self) -> &T
where T: JsCast,

Source§

impl RefCast for SVGElementTagNameMap

Source§

type From = JsValue

Source§

fn ref_cast(_from: &Self::From) -> &Self

Source§

fn ref_cast_mut(_from: &mut Self::From) -> &mut Self

Source§

impl UseInJsCode for SVGElementTagNameMap

Source§

fn serialize_to(&self, buf: &mut Formatter<'_>) -> Result

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ToJs<T> for T
where T: UseInJsCode + ?Sized,