Code Monkey home page Code Monkey logo

Comments (6)

keeganstreet avatar keeganstreet commented on July 23, 2024

This defect occurred for my website too. The line shivedSheet.removeNode(true) froze IE8. CPU usage went up to 100% and the webpage appeared blank and white.

Based on @dragosu's solution, I have placed that particular line in a setTimeout.

ownerWindow.attachEvent('onafterprint', function() {
  // remove wrappers, leaving the original elements, and remove the shived style sheet
  removeWrappers(wrappers);
  setTimeout(function() {
    shivedSheet.removeNode(true);
  }, 500);
});

from html5shiv.

aFarkas avatar aFarkas commented on July 23, 2024

The setTimeout solution by @keeganstreet can also cause some problems, so I can't change the script to this. I really need a testcase. If one those pages is now online. I would like to have a link. (Even if you fixed it by changing the source of your html5shiv). You can also send me an email.

from html5shiv.

keeganstreet avatar keeganstreet commented on July 23, 2024

I can't share this particular website but I will try to recreate the defect separately.

from html5shiv.

mrazzari avatar mrazzari commented on July 23, 2024

@aFarkas I've been able to track this issue down to a crazy mix of things...

Please check this testcase: https://gist.github.com/2838269

Some notes:

  • The css file is inside a folder. If it's at the same level as the html file, I can't repro.
  • The nobile-webfont.eot file doesn't exist. If I create that file (just an empty file with that name), results were random for me (sometimes can repro, sometime can't)
  • This will only happen in native IE8. Not "IE9 in IE8 mode", and probably not in IE Collection either.

from html5shiv.

mrazzari avatar mrazzari commented on July 23, 2024

FWIW, in case anyone needs an urgent fix for this, here's the minified version of @keeganstreet's workaround.
https://gist.github.com/2855085

@aFarkas, it would be cool to know what kind of "some problems" you're referring to, so we can more actively look for them. The setTimeout fix seems to be working OK in our tests.

from html5shiv.

aFarkas avatar aFarkas commented on July 23, 2024

Many thanks to all of you guys, especially for the testcase and for the code fix.

from html5shiv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.