Skip to main content

web_sys/features/
gen_SvgViewElement.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "SvgElement",
9        extends = "Element",
10        extends = "Node",
11        extends = "EventTarget",
12        extends = "::js_sys::Object",
13        js_name = "SVGViewElement",
14        typescript_type = "SVGViewElement"
15    )]
16    #[derive(Debug, Clone, PartialEq, Eq)]
17    #[doc = "The `SvgViewElement` class."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGViewElement)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `SvgViewElement`*"]
22    pub type SvgViewElement;
23    #[cfg(feature = "SvgAnimatedRect")]
24    #[wasm_bindgen(method, getter, js_class = "SVGViewElement", js_name = "viewBox")]
25    #[doc = "Getter for the `viewBox` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGViewElement/viewBox)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedRect`, `SvgViewElement`*"]
30    pub fn view_box(this: &SvgViewElement) -> SvgAnimatedRect;
31    #[cfg(feature = "SvgAnimatedPreserveAspectRatio")]
32    #[wasm_bindgen(
33        method,
34        getter,
35        js_class = "SVGViewElement",
36        js_name = "preserveAspectRatio"
37    )]
38    #[doc = "Getter for the `preserveAspectRatio` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGViewElement/preserveAspectRatio)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedPreserveAspectRatio`, `SvgViewElement`*"]
43    pub fn preserve_aspect_ratio(this: &SvgViewElement) -> SvgAnimatedPreserveAspectRatio;
44    #[wasm_bindgen(method, getter, js_class = "SVGViewElement", js_name = "zoomAndPan")]
45    #[doc = "Getter for the `zoomAndPan` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGViewElement/zoomAndPan)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `SvgViewElement`*"]
50    pub fn zoom_and_pan(this: &SvgViewElement) -> u16;
51    #[wasm_bindgen(method, setter, js_class = "SVGViewElement", js_name = "zoomAndPan")]
52    #[doc = "Setter for the `zoomAndPan` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGViewElement/zoomAndPan)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `SvgViewElement`*"]
57    pub fn set_zoom_and_pan(this: &SvgViewElement, value: u16);
58}
59impl SvgViewElement {
60    #[doc = "The `SVGViewElement.SVG_ZOOMANDPAN_UNKNOWN` const."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `SvgViewElement`*"]
63    pub const SVG_ZOOMANDPAN_UNKNOWN: u16 = 0i64 as u16;
64    #[doc = "The `SVGViewElement.SVG_ZOOMANDPAN_DISABLE` const."]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `SvgViewElement`*"]
67    pub const SVG_ZOOMANDPAN_DISABLE: u16 = 1u64 as u16;
68    #[doc = "The `SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY` const."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `SvgViewElement`*"]
71    pub const SVG_ZOOMANDPAN_MAGNIFY: u16 = 2u64 as u16;
72}