pub struct SVGElementTagNameMap(/* private fields */);Implementations§
Source§impl SVGElementTagNameMap
impl SVGElementTagNameMap
pub fn get_view(&self) -> SVGViewElement
pub fn set_view(&self, value: &SVGViewElement)
pub fn get_use(&self) -> SVGUseElement
pub fn set_use(&self, value: &SVGUseElement)
pub fn get_tspan(&self) -> SVGTSpanElement
pub fn set_tspan(&self, value: &SVGTSpanElement)
pub fn get_title(&self) -> SVGTitleElement
pub fn set_title(&self, value: &SVGTitleElement)
pub fn get_text_path(&self) -> SVGTextPathElement
pub fn set_text_path(&self, value: &SVGTextPathElement)
pub fn get_text(&self) -> SVGTextElement
pub fn set_text(&self, value: &SVGTextElement)
pub fn get_symbol(&self) -> SVGSymbolElement
pub fn set_symbol(&self, value: &SVGSymbolElement)
pub fn get_switch(&self) -> SVGSwitchElement
pub fn set_switch(&self, value: &SVGSwitchElement)
pub fn get_svg(&self) -> SVGSVGElement
pub fn set_svg(&self, value: &SVGSVGElement)
pub fn get_style(&self) -> SVGStyleElement
pub fn set_style(&self, value: &SVGStyleElement)
pub fn get_stop(&self) -> SVGStopElement
pub fn set_stop(&self, value: &SVGStopElement)
pub fn get_set(&self) -> SVGSetElement
pub fn set_set(&self, value: &SVGSetElement)
pub fn get_script(&self) -> SVGScriptElement
pub fn set_script(&self, value: &SVGScriptElement)
pub fn get_rect(&self) -> SVGRectElement
pub fn set_rect(&self, value: &SVGRectElement)
pub fn get_radial_gradient(&self) -> SVGRadialGradientElement
pub fn set_radial_gradient(&self, value: &SVGRadialGradientElement)
pub fn get_polyline(&self) -> SVGPolylineElement
pub fn set_polyline(&self, value: &SVGPolylineElement)
pub fn get_polygon(&self) -> SVGPolygonElement
pub fn set_polygon(&self, value: &SVGPolygonElement)
pub fn get_pattern(&self) -> SVGPatternElement
pub fn set_pattern(&self, value: &SVGPatternElement)
pub fn get_path(&self) -> SVGPathElement
pub fn set_path(&self, value: &SVGPathElement)
pub fn get_mpath(&self) -> SVGMPathElement
pub fn set_mpath(&self, value: &SVGMPathElement)
pub fn get_metadata(&self) -> SVGMetadataElement
pub fn set_metadata(&self, value: &SVGMetadataElement)
pub fn get_mask(&self) -> SVGMaskElement
pub fn set_mask(&self, value: &SVGMaskElement)
pub fn get_marker(&self) -> SVGMarkerElement
pub fn set_marker(&self, value: &SVGMarkerElement)
pub fn get_linear_gradient(&self) -> SVGLinearGradientElement
pub fn set_linear_gradient(&self, value: &SVGLinearGradientElement)
pub fn get_line(&self) -> SVGLineElement
pub fn set_line(&self, value: &SVGLineElement)
pub fn get_image(&self) -> SVGImageElement
pub fn set_image(&self, value: &SVGImageElement)
pub fn get_g(&self) -> SVGGElement
pub fn set_g(&self, value: &SVGGElement)
pub fn get_foreign_object(&self) -> SVGForeignObjectElement
pub fn set_foreign_object(&self, value: &SVGForeignObjectElement)
pub fn get_filter(&self) -> SVGFilterElement
pub fn set_filter(&self, value: &SVGFilterElement)
pub fn get_fe_turbulence(&self) -> SVGFETurbulenceElement
pub fn set_fe_turbulence(&self, value: &SVGFETurbulenceElement)
pub fn get_fe_tile(&self) -> SVGFETileElement
pub fn set_fe_tile(&self, value: &SVGFETileElement)
pub fn get_fe_spot_light(&self) -> SVGFESpotLightElement
pub fn set_fe_spot_light(&self, value: &SVGFESpotLightElement)
pub fn get_fe_specular_lighting(&self) -> SVGFESpecularLightingElement
pub fn set_fe_specular_lighting(&self, value: &SVGFESpecularLightingElement)
pub fn get_fe_point_light(&self) -> SVGFEPointLightElement
pub fn set_fe_point_light(&self, value: &SVGFEPointLightElement)
pub fn get_fe_offset(&self) -> SVGFEOffsetElement
pub fn set_fe_offset(&self, value: &SVGFEOffsetElement)
pub fn get_fe_morphology(&self) -> SVGFEMorphologyElement
pub fn set_fe_morphology(&self, value: &SVGFEMorphologyElement)
pub fn get_fe_merge_node(&self) -> SVGFEMergeNodeElement
pub fn set_fe_merge_node(&self, value: &SVGFEMergeNodeElement)
pub fn get_fe_merge(&self) -> SVGFEMergeElement
pub fn set_fe_merge(&self, value: &SVGFEMergeElement)
pub fn get_fe_image(&self) -> SVGFEImageElement
pub fn set_fe_image(&self, value: &SVGFEImageElement)
pub fn get_fe_gaussian_blur(&self) -> SVGFEGaussianBlurElement
pub fn set_fe_gaussian_blur(&self, value: &SVGFEGaussianBlurElement)
pub fn get_fe_func_r(&self) -> SVGFEFuncRElement
pub fn set_fe_func_r(&self, value: &SVGFEFuncRElement)
pub fn get_fe_func_g(&self) -> SVGFEFuncGElement
pub fn set_fe_func_g(&self, value: &SVGFEFuncGElement)
pub fn get_fe_func_b(&self) -> SVGFEFuncBElement
pub fn set_fe_func_b(&self, value: &SVGFEFuncBElement)
pub fn get_fe_func_a(&self) -> SVGFEFuncAElement
pub fn set_fe_func_a(&self, value: &SVGFEFuncAElement)
pub fn get_fe_flood(&self) -> SVGFEFloodElement
pub fn set_fe_flood(&self, value: &SVGFEFloodElement)
pub fn get_fe_drop_shadow(&self) -> SVGFEDropShadowElement
pub fn set_fe_drop_shadow(&self, value: &SVGFEDropShadowElement)
pub fn get_fe_distant_light(&self) -> SVGFEDistantLightElement
pub fn set_fe_distant_light(&self, value: &SVGFEDistantLightElement)
pub fn get_fe_displacement_map(&self) -> SVGFEDisplacementMapElement
pub fn set_fe_displacement_map(&self, value: &SVGFEDisplacementMapElement)
pub fn get_fe_diffuse_lighting(&self) -> SVGFEDiffuseLightingElement
pub fn set_fe_diffuse_lighting(&self, value: &SVGFEDiffuseLightingElement)
pub fn get_fe_convolve_matrix(&self) -> SVGFEConvolveMatrixElement
pub fn set_fe_convolve_matrix(&self, value: &SVGFEConvolveMatrixElement)
pub fn get_fe_composite(&self) -> SVGFECompositeElement
pub fn set_fe_composite(&self, value: &SVGFECompositeElement)
pub fn get_fe_component_transfer(&self) -> SVGFEComponentTransferElement
pub fn set_fe_component_transfer(&self, value: &SVGFEComponentTransferElement)
pub fn get_fe_color_matrix(&self) -> SVGFEColorMatrixElement
pub fn set_fe_color_matrix(&self, value: &SVGFEColorMatrixElement)
pub fn get_fe_blend(&self) -> SVGFEBlendElement
pub fn set_fe_blend(&self, value: &SVGFEBlendElement)
pub fn get_ellipse(&self) -> SVGEllipseElement
pub fn set_ellipse(&self, value: &SVGEllipseElement)
pub fn get_desc(&self) -> SVGDescElement
pub fn set_desc(&self, value: &SVGDescElement)
pub fn get_defs(&self) -> SVGDefsElement
pub fn set_defs(&self, value: &SVGDefsElement)
pub fn get_clip_path(&self) -> SVGClipPathElement
pub fn set_clip_path(&self, value: &SVGClipPathElement)
pub fn get_circle(&self) -> SVGCircleElement
pub fn set_circle(&self, value: &SVGCircleElement)
pub fn get_animate_transform(&self) -> SVGAnimateTransformElement
pub fn set_animate_transform(&self, value: &SVGAnimateTransformElement)
pub fn get_animate_motion(&self) -> SVGAnimateMotionElement
pub fn set_animate_motion(&self, value: &SVGAnimateMotionElement)
pub fn get_animate(&self) -> SVGAnimateElement
pub fn set_animate(&self, value: &SVGAnimateElement)
pub fn get_a(&self) -> SVGAElement
pub fn set_a(&self, value: &SVGAElement)
Methods from Deref<Target = JsObject>§
Sourcepub fn js_get_field(&self, property: &dyn UseInJsCode) -> JsValue
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();
}Sourcepub fn js_set_field(&self, property: &dyn UseInJsCode, value: &dyn UseInJsCode)
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");
}Sourcepub fn js_call_method<'a>(
&'a self,
method_name: &'a str,
args: impl IntoIterator<Item = &'a dyn UseInJsCode>,
last_arg_variadic: bool,
) -> JsValue
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).
Sourcepub fn js_call_self<'a>(
&'a self,
args: impl IntoIterator<Item = &'a dyn UseInJsCode>,
last_arg_variadic: bool,
) -> JsValue
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>§
pub fn browser(&self) -> &Browser
Sourcepub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>
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
impl AsRef<JsObject> for SVGElementTagNameMap
Source§impl AsRef<JsValue> for SVGElementTagNameMap
impl AsRef<JsValue> for SVGElementTagNameMap
Source§impl Clone for SVGElementTagNameMap
impl Clone for SVGElementTagNameMap
Source§fn clone(&self) -> SVGElementTagNameMap
fn clone(&self) -> SVGElementTagNameMap
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more