Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/filter-effects/reference-filter-update-on-attribute-change-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>SVG Filters: Invalidation of SVG filter attributes on HTML</title>
<link rel="match" href="reference/reference-filter-update-on-attribute-change-001-ref.html">
<meta name="assert" content="Dynamically adding an attribute of a filter primitive"/>
<head>
<script>
function run() {
document.getElementById('color').setAttribute('values', '90');
}
</script>
</head>
<body onload="run()">
<defs>
<filter id="MyFilter">
<fecolormatrix id="color" type="hueRotate"></fecolormatrix>
</filter>
</defs>
</svg>
<div style="filter: url(#MyFilter); width:100px; height:100px; background-color:red;"></div>
</body>