Skip to content

Commit

Permalink
more fix IE < 9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
termi committed Aug 20, 2012
1 parent c0e4e9a commit 61fa589
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 6 additions & 4 deletions __SRC/a.ie8.js
Expand Up @@ -734,12 +734,14 @@ if(_browser_msie < 9) {
if(nativeEvent === void 0) {
_throw("WRONG_THIS_ERR")
}
/*else if(nativeEvent === null) {
//_ielt9_Event.destroyLinkToNativeEvent was fired
}*/
else if(nativeEvent === null) {
//_ielt9_Event.destroyLinkToNativeEvent was fired
nativeEvent = _ielt9_Event.getNativeEvent.fakeObject;
}

return nativeEvent;
};
_ielt9_Event.getNativeEvent.fakeObject = {};

/** @this {_ielt9_Event} */
_ielt9_Event.destroyLinkToNativeEvent = function() {
Expand Down Expand Up @@ -1266,7 +1268,7 @@ else {//IE8 quirk mode, IE lt 8
// create an <iframe>
_tmp_ = document.createElement("iframe");
_tmp_.style.display = "none";
document.body.appendChild(_tmp_);
(document.body || _document_documentElement).appendChild(_tmp_);

// write a script into the <iframe> and steal its Array object
_tmp_.contentWindow.document.write(
Expand Down
11 changes: 7 additions & 4 deletions __SRC/a.ielt8.js
Expand Up @@ -734,12 +734,14 @@ if(_browser_msie < 9) {
if(nativeEvent === void 0) {
_throw("WRONG_THIS_ERR")
}
/*else if(nativeEvent === null) {
else if(nativeEvent === null) {
//_ielt9_Event.destroyLinkToNativeEvent was fired
}*/
nativeEvent = _ielt9_Event.getNativeEvent.fakeObject;
}

return nativeEvent;
};
_ielt9_Event.getNativeEvent.fakeObject = {};

/** @this {_ielt9_Event} */
_ielt9_Event.destroyLinkToNativeEvent = function() {
Expand Down Expand Up @@ -1266,7 +1268,8 @@ else {//IE8 quirk mode, IE lt 8
// create an <iframe>
_tmp_ = document.createElement("iframe");
_tmp_.style.display = "none";
document.body.appendChild(_tmp_);

(document.body || _document_documentElement).appendChild(_tmp_);

// write a script into the <iframe> and steal its Array object
_tmp_.contentWindow.document.write(
Expand Down Expand Up @@ -2778,7 +2781,7 @@ _Node_prototype.g16 = _returnFirstParam(16);
_Node_prototype["__ielt8__element_init__"] = function __ielt8__element_init__() {
var thisObj = this;
if(thisObj["element"])thisObj = thisObj["element"];//¬_¬ only if the save `this` to local variable

if(!("prepend" in thisObj)) {//DOM4 API
thisObj["after"] = _Element_prototype["after"];
thisObj["before"] = _Element_prototype["before"];
Expand Down

0 comments on commit 61fa589

Please sign in to comment.