diff --git a/lib/client/ie.js b/lib/client/ie.js index 6ac58860..0ea6d9a0 100644 --- a/lib/client/ie.js +++ b/lib/client/ie.js @@ -6,7 +6,7 @@ var Util, DOM, $; /* setting head ie6 - ie8 */ if(!document.head){ - document.head = document.getElementsByTagName("head")[0]; + document.head = $('head')[0]; /* {name: '', src: ' ',func: '', style: '', id: '', parent: '', @@ -45,22 +45,13 @@ var Util, DOM, $; * @param pType * @param pListener */ - DOM.addListener = function(pType, pListener){ - var lRet = this, - lType = 'on' + pType, - lFunc = document[lType]; - - document[lType] = function(){ - Util.exec(lFunc); - pListener(); - }; - - return lRet; + DOM.addListener = function(pType, pListener, pCapture, pElement){ + return $(pElement || window).bind(pType, null, pListener); }; if(document.removeEventListener){ DOM.removeListener = function(pType, pListener, pCapture, pElement){ - $(pElement || window).unbind(pType, pListener); + return $(pElement || window).unbind(pType, pListener); }; }