The base Element object in dart:html has a property elements which is an implementation of List<E>. The add method appends elements to the DOM. I would like to prepend or insert an element into the DOM. None of the insert methods in ElementList are implemented. How can I do this?
The base Element object in dart:html has a property elements which is an implementation
Share
So lets say you have this HTML snippet:
You can do this to insert an element before the div:
Now your HTML will be: