Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Feb 10, 2012
@mdumic mdumic Added fix to enable asynchronous loading in IE (fixes #171 and #175) 2574bd6
@sorccu Merge pull request #232 from mdumic/fix-171
Added fix to enable asynchronous loading in IE (fixes #171 and #175)
79ea413
Showing with 7 additions and 4 deletions.
  1. +7 −4 js/cufon.js
View
11 js/cufon.js
@@ -975,8 +975,10 @@ Cufon.registerEngine('vml', (function() {
check = null;
var HAS_BROKEN_LINEHEIGHT = (document.documentMode || 0) < 8;
-
- document.write(('<style type="text/css">' +
+
+ var styleSheet = document.createElement('style');
+ styleSheet.type = 'text/css';
+ styleSheet.styleSheet.cssText = (
'cufoncanvas{text-indent:0;}' +
'@media screen{' +
'cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}' +
@@ -994,8 +996,9 @@ Cufon.registerEngine('vml', (function() {
'}' +
'@media print{' +
'cufon cufoncanvas{display:none;}' +
- '}' +
- '</style>').replace(/;/g, '!important;'));
+ '}'
+ ).replace(/;/g, '!important;');
+ document.getElementsByTagName('head')[0].appendChild(styleSheet);
function getFontSizeInPixels(el, value) {
return getSizeInPixels(el, /(?:em|ex|%)$|^[a-z-]+$/i.test(value) ? '1em' : value);

No commit comments for this range

Something went wrong with that request. Please try again.