]> git.parisson.com Git - pdf.js.git/commitdiff
Add the style element to the head rather than first element in the document, as the...
authorChristian Legnitto <clegnitto@mozilla.com>
Tue, 3 Jan 2012 05:40:43 +0000 (21:40 -0800)
committerChristian Legnitto <clegnitto@mozilla.com>
Tue, 3 Jan 2012 05:40:43 +0000 (21:40 -0800)
src/fonts.js

index 83ce4abaabd4488dd8d16cfec079c46ece79204c..1b959d6c25bea54dcefdae9f201f8a2c9bfa4e8a 100644 (file)
@@ -2092,7 +2092,7 @@ var Font = (function FontClosure() {
                  window.btoa(data) + ');');
       var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}';
 
-      document.documentElement.firstChild.appendChild(
+      document.documentElement.getElementsByTagName('head')[0].appendChild(
         document.createElement('style'));
 
       var styleSheet = document.styleSheets[document.styleSheets.length - 1];