I am building a YUI3 module for my workplace. I construct it like so:
var testMenu1 = new Y.ContextMenu({
id: 'testmenu1',
menuItems: {
opsdb: {
title: 'empty',
type: 'opsdb',
separator: false,
action: function(e, host) {
iframe_panel_opsdb(host);
}
}
}
});
I'd like to come in later and change the title based on the hostname I right click on. How can I do that given that testMenu1 does now exist. I can do something like testMenu1.set('id', 'newId') but menuItems.opsdb.title, I cannot figure out how to change that one.