OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <script> | |
5 test(function() { | |
6 var doc = document.implementation.createDocument("http://www.w3.org/2000/svg", "SVG", null); | |
7 var body = doc.createElementNS("http://www.w3.org/1999/xhtml", "body"); | |
8 doc.documentElement.appendChild(body); | |
9 var svgDoc = doc.implementation.createDocument("http://www.w3.org/2000/svg", " svg", null); | |
fs
2016/03/09 16:06:48
You don't need to create another document (to just
hyunjunekim2
2016/03/10 15:00:44
Done.
| |
10 var svgElement = svgDoc.documentElement; | |
11 var g = svgDoc.createElementNS("http://www.w3.org/2000/svg", "g"); | |
12 svgElement.appendChild(g); | |
13 body.appendChild(svgDoc.documentElement); | |
14 var title1 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title"); | |
15 title1.textContext = "title1"; | |
16 g.appendChild(title1); | |
17 assert_equals(doc.title,''); | |
18 var title2 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title"); | |
19 title2.textContext = "title2"; | |
20 svgElement.appendChild(title2); | |
21 assert_equals(doc.title,''); | |
22 }, "Test for setting title element of inner svg document."); | |
23 </script> | |
OLD | NEW |