Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at .

Dart Editor improves on code completion with HTML elements

Posted by Seth Ladd

Making it easier for developers to build modern web apps is one of the primary goals for Dart. Thanks to a recent commit, now when you query for an HTML element by tag name, the editor is able to infer the correct type for the variable.

Notice that InputElement is not specified anywhere in the code, yet the editor can provide sensible code completion options for some results from a query() call. This new functionality supports simple selectors like "div", "div#id", "div.class" and "div[foo='bar']".

As always, we appreciate your feedback and comments in the Dart mailing list and Stack Overflow.