I found a work-around that avoids the problem. You can simply load the SVG file with a HttpRequest like this:
HttpRequest.getString("../imgs/redLed.svg").then((r)=>svgLED=r);
then insert the String as SvgElement into the DOM like this:
SvgElement svg=new SvgElement.svg(svgLED);
bla.nodes.add(svg);
You can then query the SVG like a normal HTML Element:
svg.query("#lowVal").attributes["stop-color"]=lowOn;