OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script> | |
5 onload = function() { | |
6 // See http://code.google.com/p/chromium/issues/detail?id=359983 for details. | |
7 var tasks = [ | |
8 function () { | |
yosin_UTC9
2014/05/29 01:33:27
You can move svgElem1, svgElem2, titleElem initial
| |
9 svgElem1 = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); | |
10 }, | |
11 function () { | |
12 svgElem2 = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); | |
yosin_UTC9
2014/05/29 01:33:27
nit: we can remove this. |svgElem2| never used.
| |
13 }, | |
14 function () { | |
15 titleElem = document.createElementNS('http://www.w3.org/2000/svg', 'title' ); | |
yosin_UTC9
2014/05/29 01:33:27
nit: we can remove this. |titleElem|. never used.
| |
16 }, | |
17 function () { | |
18 generatedFrame = document.createElement('iframe'); | |
19 if (!svgElem1.parentNode) { | |
yosin_UTC9
2014/05/29 01:33:27
nit: svgElem1.parentNode is null here. Because it
| |
20 document.body.appendChild(svgElem1); | |
21 } | |
22 svgElem1.parentNode.insertBefore(generatedFrame, svgElem1); | |
yosin_UTC9
2014/05/29 01:33:27
It seems you can build |generatedFrame| by using "
| |
23 } | |
24 ]; | |
25 | |
26 function runTasks() { | |
27 while (tasks.length > 0) { | |
28 var task = tasks.shift(); | |
29 task(); | |
30 } | |
31 } | |
32 | |
33 setTimeout(runTasks, 0); | |
yosin_UTC9
2014/05/29 01:33:27
nit: window.onload = runTasks;
I think this can r
| |
34 } | |
35 </script> | |
36 </head> | |
37 <body> | |
38 test | |
39 </body> | |
40 </html> | |
OLD | NEW |