Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SVGElement のスタイルを設定しようとしていますが、失敗します。コードは次のとおりです。
import 'dart:html'; import 'dart:svg'; main(){ document.querySelector('#path').style.fill='none';//javascript: working, Dart: not working }
Dartで動作させるには?
次のような適切なプロパティがない場合でも、CssStyleDeclaration の fill プロパティを設定できます。
document.querySelector('#circle').style.setProperty('fill', 'none');
プロパティ名を文字列パラメーターとして取得する場合、このスタイルは非常に便利です。