OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <script> | |
5 function runTest() { | |
6 var newStyle = document.createElement('style'); | |
7 newStyle.innerHTML = "@font-face { font-family: f1; font-weight: 100; src: l ocal('Courier New'); }"; | |
8 document.body.offsetLeft; | |
9 document.body.insertBefore(newStyle, document.getElementById('target')); | |
10 console.log(document.styleSheets[0].cssRules[0].style.src); | |
11 console.log(document.styleSheets[1].cssRules[0].style.src); | |
ojan
2014/01/03 01:20:44
Are these console.logs accidentally included in th
tasak
2014/01/07 08:42:12
Done.
| |
12 } | |
13 </script> | |
14 </head> | |
15 <body onload="runTest()"> | |
16 <style id="target"> | |
17 @font-face { | |
18 font-family: f1; | |
19 font-weight: 100; | |
20 src: url(../../resources/Ahem.ttf); | |
21 } | |
22 </style> | |
23 <span style="font-family: f1; font-weight: 100">A</span> | |
24 </body> | |
25 </html> | |
OLD | NEW |