src/aria/tools/contextual/ContextualMenu.js
function (target, position) {
                // look for existing Contextual menu
                if (this._popup) {
                    aria.tools.contextual.ContextualMenu.close();
                }
                // first check the position else get positon from dom
                // element
                var domPosition = {};
                if (!position) {
                    if (!target.$TemplateCtxt) {
                        domPosition = domUtils.getGeometry(target);
                    } else {
                        domPosition = {
                            x : 0,
                            y : 0
                        };
                    }
                } else {
                    domPosition = position;
                }

                // look for template context
                if (target.$TemplateCtxt) {
                    this._notifyFound(target, domPosition.x, domPosition.y);
                    return;
                }
                // Internal call to initiate the notify
                this.__callContextualMenu(target, domPosition.x, domPosition.y);

                return false;

            }
function (target, position) {
                // look for existing Contextual menu
                if (this._popup) {
                    aria.tools.contextual.ContextualMenu.close();
                }
                // first check the position else get positon from dom
                // element
                var domPosition = {};
                if (!position) {
                    if (!target.$TemplateCtxt) {
                        domPosition = domUtils.getGeometry(target);
                    } else {
                        domPosition = {
                            x : 0,
                            y : 0
                        };
                    }
                } else {
                    domPosition = position;
                }

                // look for template context
                if (target.$TemplateCtxt) {
                    this._notifyFound(target, domPosition.x, domPosition.y);
                    return;
                }
                // Internal call to initiate the notify
                this.__callContextualMenu(target, domPosition.x, domPosition.y);

                return false;

            }
function ( target , position ) { // look for existing Contextual menu if ( this . _popup ) { aria . tools . contextual . ContextualMenu . close ( ) ; } // first check the position else get positon from dom // element var domPosition = { } ; if ( ! position ) { if ( ! target . $TemplateCtxt ) { domPosition = domUtils . getGeometry ( target ) ; } else { domPosition = { x : 0 , y : 0 } ; } } else { domPosition = position ; } // look for template context if ( target . $TemplateCtxt ) { this . _notifyFound ( target , domPosition . x , domPosition . y ) ; return ; } // Internal call to initiate the notify this . __callContextualMenu ( target , domPosition . x , domPosition . y ) ; return false ; }
To call the Contexual Menu
@public
@param {aria.templates.TemplateCtxt} templateCtxt or DOM element
@param {Object} obj the object to set left and top position of the contextual menu
To call the Contexual Menu