code: 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;
    }
docs: Generates name for function and registrates it in global scope.
  @param {function()} fn Function that should available in global scope.
  @param {boolean} permanent If false callback will be removed after fiest invoke.
  @return {string} Function name in global scope.