<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<svg>
<filter id="f" x="0" y="0" width="1" height="1" style="color: red"
color-interpolation-filters="sRGB">
<feDiffuseLighting lighting-color="currentcolor">
<feDistantLight elevation="90"/>
</feDiffuseLighting>
</filter>
<rect width="100" height="100" fill="orange" filter="url(#f)"/>
</svg>
<script>
runAfterLayoutAndPaint(function() {
document.getElementById('f').style.color = 'green';
}, true);
</script>