This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.someFunc = (function (func) { | |
return function () { | |
var out = func.apply(this, arguments); | |
// do something | |
return out; | |
}; | |
})(window.someFunc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addEvent(elem, event, fn) { | |
function listenHandler(e) { | |
var ret = fn.apply(this, arguments); | |
if (ret === false) { | |
e.stopPropagation(); | |
e.preventDefault(); | |
} | |
return(ret); | |
} | |
function attachHandler() { |