code: function checkBug() {
      // Check if it works on newly created node (fails in IE 9)
      var a = document.createElement('div');
      if (method.call(a, 'div')) {
          return false;
      }
  
      // Check if it works when node is appended to another node (works in IE 9)
      var b = document.createElement('div');
      a.appendChild(b);
      return method.call(b, 'div');
  }
docs: Work around IE 9 bug where it always returns false when not attached to another DOM node. Check if the bug exists in this browser