Fixing iframe's parent for postMessage in the font loading hack
This commit is contained in:
parent
8a17a9d557
commit
39894f98b2
2
fonts.js
2
fonts.js
@ -220,7 +220,7 @@ var FontLoader = {
|
||||
}
|
||||
src += ' var fontNames=[' + fontNamesArray + '];\n';
|
||||
src += ' window.onload = function () {\n';
|
||||
src += ' top.postMessage(JSON.stringify(fontNames), "*");\n';
|
||||
src += ' parent.postMessage(JSON.stringify(fontNames), "*");\n';
|
||||
src += ' }';
|
||||
src += '</script></head><body>';
|
||||
for (var i = 0; i < names.length; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user