SVGAnimatedInteger: baseVal-Eigenschaft

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Die baseVal-Eigenschaft der SVGAnimatedInteger-Schnittstelle repräsentiert den Basiswert (nicht animiert) eines animierbaren <integer>.

Einige Attribute, wie das numOctaves-Attribut des <feTurbulence>-Elements oder das order-Attribut des <feConvolveMatrix>, akzeptieren einen long-Integer als Wert. Diese Eigenschaft ermöglicht den Zugriff auf den statischen, nicht animierten Zustand des Attributs als Zahl.

Wert

Ein long; der Basiswert (nicht animiert) des reflektierten Attributs.

Beispiele

js
const feTurbulence = document.querySelector("feTurbulence");

// Set the animatable 'numOctaves' attribute
feTurbulence.setAttribute("numOctaves", "4");

// Access the SVGAnimatedInteger object
const animatedInteger = feTurbulence.numOctaves;

// Get the base value
console.log(animatedInteger.baseVal); // Output: 4

// Modify the base value
animatedInteger.baseVal = 6;

// Verify the reflected attribute value
console.log(feTurbulence.getAttribute("numOctaves")); // Output: "6"

Spezifikationen

Specification
Scalable Vector Graphics (SVG) 2
# __svg__SVGAnimatedInteger__baseVal

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
baseVal

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch