multiple-text-nodes.window.js (563B)
1 async_test(t => { 2 const div = document.body.appendChild(document.createElement("div")); 3 t.add_cleanup(() => div.remove()); 4 const t1 = div.appendChild(new Text("")); 5 div.appendChild(new Text("")); 6 const t2 = div.appendChild(new Text("")); 7 const t3 = div.appendChild(new Text("")); 8 t.step_timeout(() => { 9 t1.data = "X"; 10 t2.data = " "; 11 t3.data = "Y"; 12 assert_equals(div.innerText, "X Y", "innerText"); 13 assert_equals(div.outerText, "X Y", "outerText"); 14 t.done(); 15 }, 100); 16 }, "Ensure multiple text nodes get rendered properly");