function forceLogout (domain, callback) {
  var endpoint = 'https://' + domain + '/logout';
  var iframe = document.createElement('iframe');
  iframe.style.display = 'none';

  if (iframe.attachEvent) {
    iframe.attachEvent('onload', iframeloaded);
  } else {
    iframe.onload = iframeloaded;
  }

  function iframeloaded () {
    if (this.src !== endpoint) return;
    callback();
  };

  document.body.appendChild(iframe).src = endpoint;
}

@@ -85,16 +85,17 @@
 ogout';%0A
+%0A
   var if
@@ -336,12 +336,14 @@
 if (
-this
+iframe
 .src
@@ -361,14 +361,68 @@
 nt) 
-return
+throw new Error('Could not load logout endpoint via iFrame')
 ;%0A  
@@ -441,16 +441,41 @@
 ;%0A  %7D;%0A%0A
+  iframe.src = endpoint;%0A
   docume
@@ -501,27 +501,12 @@
 (iframe)
-.src = endpoint
 ;%0A%7D%0A

Fix bug on IE8 with `this` referencing window instead of iframe