Once you add the element to the body, any CSS that applies would take effect, both for “ul” and “li” elements as well as for any classes that you declare for the elements that you create.
Well, unless one context menu is similar to the other one, so that you can make elements of it visible or not depending on how it got invoked, you won’t be able to use the GraphObject.contextMenu property for both menus.
Instead you’ll need to implement both GraphObject.doubleClick and GraphObject.contextClick** event handlers, doing similar things but with different HTML context menus. I’m sorry I don’t have an example for you at this time, although you should be able to figure it out – it’s almost all independent of GoJS.