mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 13:11:15 +00:00
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:
parent
72aae537a2
commit
bef7cd354f
|
@ -138,7 +138,7 @@ class SearchBarElement extends HtmlElement implements Renderable {
|
|||
})
|
||||
];
|
||||
}
|
||||
_resultsArea.children = [
|
||||
_resultsArea.nodes = [
|
||||
new ButtonElement()
|
||||
..text = '▲'
|
||||
..disabled = _results.isEmpty
|
||||
|
|
|
@ -161,7 +161,7 @@ class MemoryAllocationsElement extends HtmlElement implements Renderable {
|
|||
..children = [
|
||||
new SpanElement()
|
||||
..classes = ['group']
|
||||
..children = [
|
||||
..nodes = [
|
||||
new Text('Since Last '),
|
||||
resetAccumulators
|
||||
..text = 'Reset'
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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')];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue