You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void main() {
h.SpanElement span = new h.SpanElement();
span.appendText('1\n2');
for (h.Node testn in span.nodes) {
print("${testn.nodeType} ${testn.$dom_localName} ${testn.nodeValue}");
}
}
What is the expected output?
3 null 1
2
What do you see instead?
In Dartium or Firefox, I see the expected output. In IE9, I see:
3 null 1
1 br null
3 null 2
What version of the product are you using? On what operating system?
Dart SDK version 0.5.13.1_r23552
Windows 7 and IE9
Please provide any additional information below.
The API documentation for Element.appendText is "Adds the specified text as a text node after the last child of this element.". With IE9, dart2js is sometimes adding BR elements and text nodes instead of just using one text node as advertised...
The text was updated successfully, but these errors were encountered:
Changing the documentation is a way to fix it, but I would still be surprised at the behavior with the new spec "Adds the specified text after the last child of this element.". I would not expect BR elements to be used in some browsers. I would suggest hinting at possibly different implementations depending on the browser, potentially adding non-text nodes.
This issue was originally filed by da...@altern.org
Try the sample code:
void main() {
h.SpanElement span = new h.SpanElement();
span.appendText('1\n2');
for (h.Node testn in span.nodes) {
print("${testn.nodeType} ${testn.$dom_localName} ${testn.nodeValue}");
}
}
What is the expected output?
3 null 1
2
What do you see instead?
In Dartium or Firefox, I see the expected output. In IE9, I see:
3 null 1
1 br null
3 null 2
What version of the product are you using? On what operating system?
Dart SDK version 0.5.13.1_r23552
Windows 7 and IE9
Please provide any additional information below.
The API documentation for Element.appendText is "Adds the specified text as a text node after the last child of this element.". With IE9, dart2js is sometimes adding BR elements and text nodes instead of just using one text node as advertised...
The text was updated successfully, but these errors were encountered: