|  |  | 
 |  |  | /** | 
 |  |  |  * Package: svgedit.contextmenu | 
 |  |  |  *  | 
 |  |  |  * | 
 |  |  |  * Licensed under the Apache License, Version 2 | 
 |  |  |  *  | 
 |  |  |  * | 
 |  |  |  * Author: Adam Bender | 
 |  |  |  */ | 
 |  |  | // Dependencies: | 
 |  |  | 
 |  |  |       $("#cmenu_canvas").append("<li class='separator'>"); | 
 |  |  |     } | 
 |  |  |     var shortcut = menuItem.shortcut || ""; | 
 |  |  |     $("#cmenu_canvas").append("<li class='disabled'><a href='#" + menuItem.id + "'>"                    | 
 |  |  |     $("#cmenu_canvas").append("<li class='disabled'><a href='#" + menuItem.id + "'>" | 
 |  |  |                   + menuItem.label + "<span class='shortcut'>" | 
 |  |  |                   + shortcut + "</span></a></li>"); | 
 |  |  |   } | 
 |  |  | 
 |  |  |   var menuItemIsValid = function(menuItem) { | 
 |  |  |     return menuItem && menuItem.id && menuItem.label && menuItem.action && typeof menuItem.action == 'function'; | 
 |  |  |   } | 
 |  |  |    | 
 |  |  |  | 
 |  |  |   // Defer injection to wait out initial menu processing. This probably goes away once all context | 
 |  |  |   // menu behavior is brought here. | 
 |  |  |   methodDraw.ready(function() { |