/[suikacvs]/www/test/svg/style/dynamic-replace-1.xml
Suika

Contents of /www/test/svg/style/dynamic-replace-1.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sat Jan 19 06:38:41 2008 UTC (18 years, 5 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/xml
New tests; see <http://suika.fam.cx/gate/2005/sw/style> for results

1 <svg xmlns="http://www.w3.org/2000/svg">
2 <text xml:lang="en" x="50%" y="10%" text-anchor="middle" fill="blue">
3 Click the circle below. If the color of the circle has changed to green,
4 then your browser passes this test.
5 </text>
6 <style type="text/css">
7 circle {
8 fill: blue;
9 }
10 </style>
11 <circle cx="50%" cy="50%" r="20%" onclick="
12 var o = document.getElementsByTagNameNS ('http://www.w3.org/2000/svg', 'style')[0];
13 var n = document.createElementNS ('http://www.w3.org/2000/svg', 'style');
14 n.type = 'text/css';
15 n.textContent = 'circle { fill: green }';
16 o.parentNode.replaceChild (n, o);
17 "/>
18 </svg>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24