const feTurbulence = document.querySelector("feTurbulence");
// Set the animatable 'numOctaves' attribute
feTurbulence.setAttribute("numOctaves", "4");
// Access the SVGAnimatedInteger object
const animatedInteger = feTurbulence.numOctaves;
// Get the animated value (read-only)
console.log(animatedInteger.animVal); // Output: 4 (the current animated value)SVGAnimatedInteger: animVal property / notebook
SVGAnimatedInteger: animVal property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.