code: function(container, settings) {
              this.setSettings(settings, Garnish.Menu.defaults);
  
              this.$container = $(container);
  
              this.$options = $();
              this.addOptions(this.$container.find('a'));
  
              // Menu List
              this.menuId = 'menu' + this._namespace;
              this.$menuList = $('ul', this.$container);
              this.$menuList.attr({
                  'role': 'listbox',
                  'id': this.menuId,
                  'aria-hidden': 'true'
              });
  
              // Deprecated
              if (this.settings.attachToElement) {
                  this.settings.anchor = this.settings.attachToElement;
                  Garnish.log('The \'attachToElement\' setting is deprecated. Use \'anchor\' instead.');
              }
  
              if (this.settings.anchor) {
                  this.$anchor = $(this.settings.anchor);
              }
  
              // Prevent clicking on the container from hiding the menu
              this.addListener(this.$container, 'mousedown', function(ev) {
                  ev.stopPropagation();
  
                  // Prevent this from causing the menu button to blur
                  ev.preventDefault();
              });
          }
docs: Constructor