register a handler (add a callback function)
328938
def handle(self, handler):
        
        with self._hlock:
            self._handler_list.append(handler)
        return self
1286638
def register_callback_deleted(self, func, serialised=True):
        
        self.__add_callback(_CB_DELETED, func, serialised_if_crud=serialised)
31885
def register(self, *handlers, **params):
        
        for handler in handlers:

            if issubclass(handler, PWModel):
                handler = type(
                    handler._meta.db_table.title() + 'Admin',
                    (PWAdminHandler,), dict(model=handler, **params))
                self.app.register(handler)
                continue

            name = handler.name.lower()
            self.handlers[name] = handler
1286725
function add(f)  {
    if (handlers.every(isnt(f)))  handlers.push(f)
    return notify }
403914
private function registerShutdownHandler()
    {
        if ($this->shutdownFunctionRegistered) {
            return;
        }

        $subscriber = $this;
        register_shutdown_function(function () use ($subscriber) {
            if (!$error = error_get_last()) {
                return;
            }

            // Don't fail on non-blcoking errors!
            if (\in_array($error['type'], [E_DEPRECATED, E_USER_DEPRECATED, E_CORE_WARNING, E_CORE_ERROR], true)) {
                return;
            }

            $subscriber->handleErrors();
        });

        $this->shutdownFunctionRegistered = true;
    }
495474
def register_handler(self, handler):
        
        self._handlers[handler.namespace] = handler

        handler.registered(self)
1047265
def add_handler(cls, level, fmt, colorful, **kwargs):
    """"""
    global g_logger
 
    if isinstance(level, str):
        level = getattr(logging, level.upper(), logging.DEBUG)
 
    handler = cls(**kwargs)
    handler.setLevel(level)
 
    if colorful:
        formatter = ColoredFormatter(fmt, datefmt='%Y-%m-%d %H:%M:%S')
    else:
        formatter = logging.Formatter(fmt, datefmt='%Y-%m-%d %H:%M:%S')
 
    handler.setFormatter(formatter)
    g_logger.addHandler(handler)
 
    return handler
321441
def addHandler(name, basepath=None, baseurl=None, allowDownscale=False):
    """"""
    if basepath is None:
        basepath = '.'
    _handlers.append(_handler_classes[name](basepath, baseurl, allowDownscale))
571916
def addHandler(self, handler):
        
        self._handlers.append(handler)
        self.inner.addHandler(handler)
1372444
function register(handle) {
  if (Array.isArray(handle)) {
    handle.forEach(item => {
      utils.register(item);
    });
  } else {
    utils.register(handle);
  }
}
702698
def register_callback(self, sensorid, callback, user_data=None):
        """"""
        if sensorid not in self._registry:
            self._registry[sensorid] = list()
        self._registry[sensorid].append((callback, user_data))
499439
function(name, registerCallback){
      if($bridge['registerHandler']){

        setTimeout(function(){
          $bridge.registerHandler(name,registerCallback)
        },bridgeConfig.bridgeWebViewDelay)

      }else{
        console.log("don't built-in WebView invoking ",name,'{registerHandler}')
      }
    }
222941
def register_event(self, event):
        """"""

        self.log('Registering event hook:', event.cmd, event.thing,
                 pretty=True, lvl=verbose)
        self.hooks[event.cmd] = event.thing
366430
def subscribe(self, handler):
        """"""
        assert callable(handler), "Invalid handler %s" % handler
        self.handlers.append(handler)
934401
function addHandler(element, type, handler) {
        if (element.addEventListener) {
            element.addEventListener(type, handler, false)
        } else if (element.attachEvent) {
            element.attachEvent("on" + type, handler)
        } else {
            element["on" + type] = handler
        }
    }
762700
function callbackHandler(callback) {
        return function(error, data) {
            if (data === 'OK') {
                callback();
                return;
            }

            callback(error, deserializeResponse(data));
        };
    }
281525
def on_resolve(target, func, *args, **kwargs):
    
    return _register_hook(ON_RESOLVE, target, func, *args, **kwargs)