Pregunta

I'm starting with some of the Dart examples. Then I wanted to query the DOM with document.query('#someId') as described here, but it seems there was no query method in document. Also creating a new element by `new Element.tag('p') doesn't work.

Then I figure out that it will work, when I change the imported package from dart:dom to dart:html. But using both of them gives me a bunch of duplicate definition of _XYZ.

So I wonder:

  1. what's the difference between dart:html and dart:dom package
  2. which one should I use
  3. why can't I use both

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top