Observatory strong mode fix: Use .nodes= instead of .children= to accommodate text nodes.

This is necessary because HtmlElement.children= requires its parameter
type to be a List<Element>, and text nodes are not elements.

Change-Id: I99c91fe060c16f02d737d904f6869b3dad19c196
Reviewed-on: https://dart-review.googlesource.com/57005
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry 2018-06-01 20:39:34 +00:00 committed by commit-bot@chromium.org
parent 72aae537a2
commit bef7cd354f
4 changed files with 5 additions and 5 deletions

View file

@ -138,7 +138,7 @@ class SearchBarElement extends HtmlElement implements Renderable {
})
];
}
_resultsArea.children = [
_resultsArea.nodes = [
new ButtonElement()
..text = ''
..disabled = _results.isEmpty

View file

@ -161,7 +161,7 @@ class MemoryAllocationsElement extends HtmlElement implements Renderable {
..children = [
new SpanElement()
..classes = ['group']
..children = [
..nodes = [
new Text('Since Last '),
resetAccumulators
..text = 'Reset'

View file

@ -108,7 +108,7 @@ class MemoryProfileElement extends HtmlElement implements Renderable {
..classes = ['content-centered-big']
..children = [
new HeadingElement.h1()
..children = [
..nodes = [
new Text(_isolate.name),
bReload
..classes = ['header_button']

View file

@ -97,7 +97,7 @@ class TimelineDashboardElement extends HtmlElement implements Renderable {
_frame.src = _makeFrameUrl();
_content.children = [
new HeadingElement.h2()
..children = ([new Text("Timeline View")]
..nodes = ([new Text("Timeline View")]
..addAll(_createButtons())
..addAll(_createTabs())),
new ParagraphElement()
@ -118,7 +118,7 @@ class TimelineDashboardElement extends HtmlElement implements Renderable {
}
}
List<Element> _createButtons() {
List<Node> _createButtons() {
if (_flags == null) {
return [new Text('Loading')];
}