src/aria/tools/contextual/ContextualMenu.js
function (target, x, y) {
                // check for template context
                var previousTarget;
                // look for the first template
                var body = Aria.$window.document.body;
                while (target && target != body && !target.__template) {
                    previousTarget = target;
                    target = target.parentNode;
                }
                // check for dom position

                if (target == body && previousTarget) {
                    // prevousTarget might be a popup
                    // first check whether the PopupManager is loaded:
                    if (aria.popups && aria.popups.PopupManager) {
                        // then look for the popup:
                        var popup = aria.popups.PopupManager.getPopupFromDom(previousTarget);
                        if (popup && popup.section && popup.section.tplCtxt) {
                            // a popup was found
                            this._notifyFound(popup.section.tplCtxt, x, y);
                        }
                    }
                } else if (target && target != body) {
                    this._notifyFound(contextManager.getFromDom(target.parentNode), x, y);
                }

            }
function (target, x, y) {
                // check for template context
                var previousTarget;
                // look for the first template
                var body = Aria.$window.document.body;
                while (target && target != body && !target.__template) {
                    previousTarget = target;
                    target = target.parentNode;
                }
                // check for dom position

                if (target == body && previousTarget) {
                    // prevousTarget might be a popup
                    // first check whether the PopupManager is loaded:
                    if (aria.popups && aria.popups.PopupManager) {
                        // then look for the popup:
                        var popup = aria.popups.PopupManager.getPopupFromDom(previousTarget);
                        if (popup && popup.section && popup.section.tplCtxt) {
                            // a popup was found
                            this._notifyFound(popup.section.tplCtxt, x, y);
                        }
                    }
                } else if (target && target != body) {
                    this._notifyFound(contextManager.getFromDom(target.parentNode), x, y);
                }

            }
function ( target , x , y ) { // check for template context var previousTarget ; // look for the first template var body = Aria . $window . document . body ; while ( target && target != body && ! target . __template ) { previousTarget = target ; target = target . parentNode ; } // check for dom position if ( target == body && previousTarget ) { // prevousTarget might be a popup // first check whether the PopupManager is loaded: if ( aria . popups && aria . popups . PopupManager ) { // then look for the popup: var popup = aria . popups . PopupManager . getPopupFromDom ( previousTarget ) ; if ( popup && popup . section && popup . section . tplCtxt ) { // a popup was found this . _notifyFound ( popup . section . tplCtxt , x , y ) ; } } } else if ( target && target != body ) { this . _notifyFound ( contextManager . getFromDom ( target . parentNode ) , x , y ) ; } }
Internal function used to notify Contextual menu
@param {HTMLElement} elm DOM element
@param {Number} xpos
@param {Number} ypos
@private
Internal function used to notify Contextual menu