Add the style element to the head rather than first element in the document, as the first element could be a comment and this would line would then throw
This commit is contained in:
parent
78f7354dc7
commit
03e39363b6
@ -2092,7 +2092,7 @@ var Font = (function FontClosure() {
|
|||||||
window.btoa(data) + ');');
|
window.btoa(data) + ');');
|
||||||
var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}';
|
var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}';
|
||||||
|
|
||||||
document.documentElement.firstChild.appendChild(
|
document.documentElement.getElementsByTagName('head')[0].appendChild(
|
||||||
document.createElement('style'));
|
document.createElement('style'));
|
||||||
|
|
||||||
var styleSheet = document.styleSheets[document.styleSheets.length - 1];
|
var styleSheet = document.styleSheets[document.styleSheets.length - 1];
|
||||||
|
Loading…
Reference in New Issue
Block a user