3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
7 var ruby
= document
.getElementById('R');
8 var span
= document
.getElementById('ML');
9 var newRT
= document
.createElement('rt');
10 var newRTText
= document
.createTextNode('Hyper-text');
11 newRT
.appendChild(newRTText
);
12 ruby
.insertBefore(newRT
, span
);
16 <body onload=
"test()">
17 <p>The following is a test for DOM manipulation within
<ruby
>: Inserting a new
<rt
> element
</p>
18 <p>Both lines should look identical (the first line is the one manipulated).
</p>
21 <p><ruby
> is defined in the
<ruby id=
"R"><span>HT
</span><span id=
"ML">ML
</span><rt>Markup Language
</rt>5</ruby> spec.
</p>
22 <p><ruby
> is defined in the
<ruby><span>HT
</span><rt>Hyper-text
</rt><span>ML
</span><rt>Markup Language
</rt>5</ruby> spec.
</p>