cowboy/jquery-hashchange

document.domain breaks hashchange events on IE6/7

cowboy opened this issue · 8 comments

Issue: setting document.domain when using $(window).bind( 'hashchange', fn ); explodes IE6/7 with an "Access denied" error.

See the original issue report for more info.

This appears to be totally fixable, I just need to figure out how to do it in an elegant way.

Thats good to hear. Thank you for taking the time to look into this. I'll keep an eye on this issue.

I have encountered what appears to be a bug in jQuery 1.4.x with setting document.domain in IE6/IE7 and accessing the location.href property. Can you reproduce my results here? http://dev.jquery.com/ticket/6500

I'm going to see if I can find a way around this, but I've got to give it some thought.

I've added my findings to the jQuery ticket but I'm more confused now then I was before.

I've got this working in the "domain" branch, it just needs to be tested. If you want to help test it, by all means!

I've downloaded the domain branch and tested your document_domain example and it seems to work perfectly in my VirtualBox test image. So it looks like you've nailed it.

So the crux of the issue is to set document domain before jQuery is loaded....who would have thought. Thank you for putting the time in to fix the issue.

No problem. I'm going to finalize these (and some other) changes soon and release a new version. Once that's all done, I'll close the issue. Thanks for the help!

Just a minor update..

I'm going to roll this and other changes into a new version, but that probably won't land until July, because this month is super busy for me. That being said, I'm considering the actual code for this to be complete, so feel free to use the "domain" branch in the meantime.