src/js/utils.js
branchpopcorn-port
changeset 78 d77fe3283530
parent 73 a8192c57c87d
child 99 912f100fecb0
equal deleted inserted replaced
77:b3140ffed377 78:d77fe3283530
    16    we need to have a special function which wraps "this" in 
    16    we need to have a special function which wraps "this" in 
    17    a closure. This way, the 
    17    a closure. This way, the 
    18 */   
    18 */   
    19 IriSP.wrap = function (obj, fn) {
    19 IriSP.wrap = function (obj, fn) {
    20   return function() {
    20   return function() {
    21     args = [].slice.call(this, arguments);
    21     var args = [].slice.call(this, arguments);
    22     fn.call(obj, args);
    22     return fn.call(obj, args);
    23   }
    23   }
    24 }
    24 }
    25 
    25 
    26 /* for ie compatibility
    26 /* for ie compatibility
    27 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
    27 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {