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 expressions = [ | |
8 " svgElem1 = document.createElementNS('http://www.w3.org/2000/svg', 'svg');" , | |
yosin_UTC9
2014/05/19 05:26:22
super-nit: It is better to use function closure ra
Andrey Kraynov
2014/05/20 21:34:46
I tried to stick to the original, but I agree with
| |
9 " svgElem2 = document.createElementNS('http://www.w3.org/2000/svg', 'svg');" , | |
10 " titleElem = document.createElementNS('http://www.w3.org/2000/svg', 'title' );", | |
11 " generatedFrame = document.createElement('iframe');" + | |
12 " if (!svgElem1.parentNode) {" + | |
13 " document.body.appendChild(svgElem1);" + | |
14 " }" + | |
15 " svgElem1.parentNode.insertBefore(generatedFrame, svgElem1);" | |
16 ]; | |
17 | |
18 function evalExpressions() { | |
19 while (expressions.length > 0) { | |
20 var expression = expressions.shift(); | |
21 eval(expression); | |
22 } | |
23 } | |
24 | |
25 setTimeout(evalExpressions, 0); | |
26 } | |
27 </script> | |
28 </head> | |
29 <body> | |
30 test | |
31 </body> | |
32 </html> | |
OLD | NEW |