docs: function publicCallback(fn, permanent){
      var name = 'basisjsCallback' + genUID();
  
      global[name] = permanent ? fn : function(){
        try {
          // IE8 and lower can't delete from global
          delete global[name];
        } catch(e) {
          global[name] = undefined;
        }
  
        return fn.apply(this, arguments);
      };
  
      return name;
    }