Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


add ie8 support #61

wants to merge 1 commit into from

6 participants


No description provided.

Alexander Shahorsky add ie8 support 5bcfb4f

This will still fail sometimes in IE8 + 7 with:

HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

I suggest moving the doc.documentElement.appendChild(script); into the onload function, too.

@ndan ndan referenced this pull request

It doesn't work in IE8 #57

nfm commented

Hi @dbanck, the Microsoft KB article ( seems to say it's an IE7 issue - are you able to confirm whether you've had the same error for IE8?

Unfortunately we can't move the appendChild into onload - appending the script is what makes it start loading in the first place. I'm looking into the jQuery pattern of handling this, which I believe is to avoid the bug you've reported - they use document.head.insertBefore(script, document.head.firstChild) instead.

I will check back soon with some more information about this pull request once I've done my homework!


Is this still active?


I confirm it's still not working in IE7, and I'm getting this error:

HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

IE8 works fine.

Is there any progress on fixing this for IE6/7 (I know we shouldn't support these old browsers, but we have no choice... sigh)


I was having the parse error with IE8, I corrected it using this -

i.e. I replaced doc.documentElement.appendChild(script); with

var first = document.getElementsByTagName('script')[0];
first.parentNode.insertBefore(script, first);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 23, 2012
  1. add ie8 support

    Alexander Shahorsky authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +10 −1 app/assets/javascripts/private_pub.js
11 app/assets/javascripts/private_pub.js
@@ -16,7 +16,16 @@ function buildPrivatePub(doc) {
var script = doc.createElement("script");
script.type = "text/javascript";
script.src = self.subscriptions.server + ".js";
- script.onload = self.connectToFaye;
+ {
+ var done = false;
+ script.onload = script.onreadystatechange = function(){
+ if(!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")){
+ done = true;
+ self.connectToFaye()
+ script.onload = script.onreadystatechange = null;
+ }
+ }
+ }
Something went wrong with that request. Please try again.