You can clone with
HTTPS or Subversion.
Inclusion of prototype.js (just inclusion, not even calling anything in it) crashes IE8 when PIE.htc is applied.
Forum post: http://css3pie.com/forum/viewtopic.php?f=3&t=19
Testcase committed at tests/submitted/forum-f3-t19.html
The crash only happens with Prototype 126.96.36.199. Downgrading to 1.6.0.* makes the crashing stop.
Also, IE7 is fine with either version.
Downgrading doesn't seem like a good fix to me =\
Yeah, I'm not saying it's a fix, just wanted to mention it here for informational/debugging purposes.
Any word on if or when this issue might be fixed. I would love to use this solution for an upcoming site launch but I use prototype 1.6.1 and downgrading is not an option.
Unfortunately I've got no clue how to proceed working around this. It appears that Prototype 1.6.1 causes the crash when used with similar HTC-based products, so getting it fixed in Prototype itself is probably our best bet.
I see someone has already opened a ticket in Prototype's tracker about crashing with curved-corner.htc -- perhaps you could inquire there and add a note that the same happens with PIE.
I'm Andrew Dupont, one of the co-maintainers of Prototype.
From what I gather about this bug, neither PIE nor Prototype appears to be at fault. The bug has been reported with Prototype and other HTCs (like the popular PNG fix), and with PIE and MooTools 1.3. It seems to be a specific sort of conflict between HTCs and augmenting DOM node host objects (the constructors for specific node types, like HTMLDivElement). The latter has been present in other browsers for years, but was a new feature to IE8.
So, in other words, it's IE's fault, but it has implications for both Prototype and HTCs like PIE.
Thanks for the info, Andrew. I had figured as much. shakes fist at IE
So, that said, do you have any ideas how to proceed getting around this? I'm happy to help trying code changes or whatnot, but since it's a crash is there even a way to get good debugging info to trace the exact code triggering the crash?
I'd hate for the answer to be to not use PIE with Prototype or MooTools.
Right, and neither do we want that to be the answer, since HTCs are a useful (if arcane) tool in many web developers' toolboxes.
One commenter on our bug says he's in the middle of a deep dive into this issue. I might end up doing my own as well. I'm perfectly willing to change our code to work around the problem, as long as I can do so without losing our ability to define methods directly on DOM nodes' prototypes (since that feature makes Prototype far more performant on IE8 than otherwise). If not, I should at least be able to create an "opt-in" workaround.
Excellent, thanks. I'll keep an eye on your ticket for progress. Please let me know if there's anything you need me to do from my end to help out.
Has anyone found a fix for this yet? I have a photo gallery that needs prototype and I'm having the same crashing problem on IE8
From the Prototype bug report it doesn't look like there's a fix yet.
So this recent StackOverflow comment explains the problem. I have no way of knowing whether this is true, but it sounds convincing.
The suggested fix appears sound. It's ugly — it requires modifying the Prototype source code — but if I understand the flaw correctly, there's no way around that.
lojjic, does the testcase still crash IE8 on your machine? I can't get it to do so in my XP virtual machine. If it's still a crasher for you, hopefully we can figure out a way to detect whether the fix has been applied — even something ugly like a version string sniff — so that I can tell those versions of IE8 not to try to extend the prototypes of DOM nodes.
Yeah the testcase still elicits the crash for me, even after updating it to use the more recent Prototype 188.8.131.52 version. I'm using a XP VM with IE8 as well, but I haven't applied updates to it in a while so that makes sense if it has indeed been fixed by a recent Windows update.
My version of IE8 is 8.0.6001.18702. What's yours?
I don't suppose there's any fool-proof way to detect the use of PIE on a page, is there? I can fix this by preventing IE8 from extending DOM prototypes across the board, but I really don't want to do that.
Indeed it is! :/
The closest you could get is to test for the presence of the window.PIE object, but I'm not sure you could reliably use that as an indicator due to the way HTC files load in and get initialized asynchronously. There's no guarantee the object will have been initialized by the time Prototype's feature detection gets executed.
HAHAHA DISREGARD THAT (I can reproduce it now)
Researching a workaround. If I can't find one, "use PIE.js" will be the official way to resolve this godforsaken issue.
Here's an even-more-basic testcase, one which demonstrates that the problem is far deeper than either of our libraries. Simply trying to read a property within an HTC produces a crash if a node's prototype has been augmented.
If I wrap the code that adds HTMLDivElement.prototype.foo in a setTimeout, or defer its execution some other way, everything works fine. But that's not feasible for Prototype because the methods need to be there by the time the next script is evaluated.
I'll keep thinking about it, but I'm damn near out of ideas.
I cannot recreate this. According to a stackoverflow article, a Windows Update fixed this issue by fixing IE itself.
I have tried prototype 1.6.1 and prototype 1.7.0, both with PIE.htc included, and no crash.
I have the latest windows update. but it still crashed...
I've also tried using IETester, crashed too
I've also tried IE8 browser mode on IE9, the same crash appear
so, does "use pie.js" still the official way of doing this or is there any other new solution?