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.
<span>hello</span>HTML の任意のビット ( など) を要素に追加したいと思います。Dartでこれを行うにはどうすればよいですか?
<span>hello</span>
次のように、HTML の任意のビットを を使用して要素に追加できますappendHtml('<span>some html</span>')。
appendHtml('<span>some html</span>')
import 'dart:html'; main() { var elem = new DivElement(); elem.appendHtml('<span>hello</span>'); }
このappendHtmlメソッドは HTML を解析し、結果のノードを要素の最後の子として追加します。
appendHtml