Compatibility hacks for IE, Opera, Safari

This commit is contained in:
notmasteryet 2011-07-01 16:59:20 -05:00
parent a77292846c
commit a82536881d
4 changed files with 144 additions and 2 deletions

View file

@ -285,7 +285,7 @@ function WorkerPDFDoc(canvas) {
var url = "url(data:" + data.mimetype + ";base64," + base64 + ");";
var rule = "@font-face { font-family:'" + data.fontName + "';src:" + url + "}";
var styleSheet = document.styleSheets[0];
styleSheet.insertRule(rule, styleSheet.length);
styleSheet.insertRule(rule, styleSheet.cssRules.length);
// Just adding the font-face to the DOM doesn't make it load. It
// seems it's loaded once Gecko notices it's used. Therefore,