Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function init() {
try {
if (typeof keymap == 'string') {
keymap = JSON.parse(keymap);
}
} catch(e) {
console.error(e);
}
emmet.loadSystemSnippets(snippets);
emmet.loadCIU(ciu);
var menu = Menus.addMenu('Emmet', 'io.emmet.EmmetMainMenu');
registerInteractiveCommands(menu);
// register all commands
actions.getList().forEach(function(action) {
if (~skippedActions.indexOf(action.name)) {
return;
}
var id = 'io.emmet.' + action.name;
if (!CommandManager.get(id)) {
// regiester new command only if wasn’t defined previously
var cmd = ~singleSelectionActions.indexOf(action.name)