dart-sublime-bundle icon indicating copy to clipboard operation
dart-sublime-bundle copied to clipboard

DAS won't suggest localName for dom.Element

Open guillermooo opened this issue 10 years ago • 1 comments

// Copyright (c) 2015, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import "package:html/parser.dart";


main() {
  var p1 = parse("<p>hello</p>");
  var t1 = p1.nodes.first;
  print(t1.^);
}

Caret at ^; localName won't show up among suggestions.

guillermooo avatar Aug 10 '15 18:08 guillermooo

It rather seems that localName isn't returned for the top-level html element.

// Copyright (c) 2015, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import "package:html/parser.dart";

main() {
  var p1 = parse("<p>hello</p>");
  var t1 = p1.nodes.first;
  var t2 = p1.nodes.first.children.first;
  print(t1.^); // no localName
  print(t2.^); // localName ok
}

guillermooo avatar Aug 23 '15 10:08 guillermooo