mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
commit
7ff35c0abe
2 changed files with 12 additions and 1 deletions
|
@ -104,7 +104,7 @@ fn serialize_elem(elem: &JS<Element>, open_elements: &mut ~[~str]) -> ~str {
|
|||
match elem.get().node.first_child {
|
||||
Some(ref child) if child.is_text() => {
|
||||
let text: JS<CharacterData> = CharacterDataCast::to(child);
|
||||
if text.get().data[0] == 0x0A as u8 {
|
||||
if text.get().data.len() > 0 && text.get().data[0] == 0x0A as u8 {
|
||||
rv.push_str("\x0A");
|
||||
}
|
||||
},
|
||||
|
|
11
src/test/html/content/test_innerHTML.html
Normal file
11
src/test/html/content/test_innerHTML.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
var a = document.createElement("div");
|
||||
a.appendChild(document.createElement("pre")).appendChild(new Text(""));
|
||||
is(a.innerHTML, "<pre></pre>");
|
||||
finish();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue