lib/core/on.js
function ( e ) {
            // Default context is `this` element
            var context = (selector ? matchElement( e.target, selector, true ) : this);

            // Handle `mouseenter` and `mouseleave`
            if ( event === "mouseenter" || event === "mouseleave" ) {
                var relatedElement = (event === "mouseenter" ? e.fromElement : e.toElement);

                if ( context && ( relatedElement !== context && !context.contains( relatedElement ) ) ) {
                    callback.call( context, e );
                }

            // Fire callback if context element
            } else if ( context ) {
                callback.call( context, e );
            }
        }
function ( e ) {
            // Default context is `this` element
            var context = (selector ? matchElement( e.target, selector, true ) : this);

            // Handle `mouseenter` and `mouseleave`
            if ( event === "mouseenter" || event === "mouseleave" ) {
                var relatedElement = (event === "mouseenter" ? e.fromElement : e.toElement);

                if ( context && ( relatedElement !== context && !context.contains( relatedElement ) ) ) {
                    callback.call( context, e );
                }

            // Fire callback if context element
            } else if ( context ) {
                callback.call( context, e );
            }
        }
function ( e ) { // Default context is `this` element var context = ( selector ? matchElement ( e . target , selector , true ) : this ) ; // Handle `mouseenter` and `mouseleave` if ( event === "mouseenter" || event === "mouseleave" ) { var relatedElement = ( event === "mouseenter" ? e . fromElement : e . toElement ) ; if ( context && ( relatedElement !== context && ! context . contains ( relatedElement ) ) ) { callback . call ( context , e ) ; } // Fire callback if context element } else if ( context ) { callback . call ( context , e ) ; } }
Unique ID for each node event
Unique ID for each node event