src/basis/dom/event.js
function clearHandlers(node, eventType){
    node = getNode(node);

    var handlers = node === global ? globalEvents : node[EVENT_HOLDER];
    if (handlers)
    {
      if (typeof eventType != 'string')
      {
        // no eventType - delete handlers for all events
        for (eventType in handlers)
          clearHandlers(node, eventType);
      }
      else
      {
        // delete eventType handlers
        var eventTypeHandlers = handlers[eventType];
        if (eventTypeHandlers)
        {
          if (node.removeEventListener)
            node.removeEventListener(eventType, eventTypeHandlers.fireEvent, false);
          else
            node.detachEvent('on' + eventType, eventTypeHandlers.fireEvent);

          delete handlers[eventType];
        }
      }
    }
  }
function clearHandlers(node, eventType){
    node = getNode(node);

    var handlers = node === global ? globalEvents : node[EVENT_HOLDER];
    if (handlers)
    {
      if (typeof eventType != 'string')
      {
        // no eventType - delete handlers for all events
        for (eventType in handlers)
          clearHandlers(node, eventType);
      }
      else
      {
        // delete eventType handlers
        var eventTypeHandlers = handlers[eventType];
        if (eventTypeHandlers)
        {
          if (node.removeEventListener)
            node.removeEventListener(eventType, eventTypeHandlers.fireEvent, false);
          else
            node.detachEvent('on' + eventType, eventTypeHandlers.fireEvent);

          delete handlers[eventType];
        }
      }
    }
  }
function clearHandlers ( node , eventType ) { node = getNode ( node ) ; var handlers = node === global ? globalEvents : node [ EVENT_HOLDER ] ; if ( handlers ) { if ( typeof eventType != 'string' ) { // no eventType - delete handlers for all events for ( eventType in handlers ) clearHandlers ( node , eventType ) ; } else { // delete eventType handlers var eventTypeHandlers = handlers [ eventType ] ; if ( eventTypeHandlers ) { if ( node . removeEventListener ) node . removeEventListener ( eventType , eventTypeHandlers . fireEvent , false ) ; else node . detachEvent ( 'on' + eventType , eventTypeHandlers . fireEvent ) ; delete handlers [ eventType ] ; } } } }
Removes all node's handlers for eventType. If eventType omited, all handlers for all eventTypes will be deleted.
@param {Node|string} node
@param {string} eventType
Removes all node s handlers for eventType . If eventType omited all handlers for all eventTypes will be deleted .