lib/bundle.js
/**
 * Create the DOM node for a MenuItem.
 */
Create the DOM node for a MenuItem.
Create the DOM node for a MenuItem .
function createItemNode(item) {
    var node = document.createElement('div');
    var icon = document.createElement('span');
    var text = document.createElement('span');
    var shortcut = document.createElement('span');
    var submenu = document.createElement('span');
    node.className = createItemClassName(item);
    icon.className = exports.ICON_CLASS;
    text.className = exports.TEXT_CLASS;
    shortcut.className = exports.SHORTCUT_CLASS;
    submenu.className = exports.SUBMENU_ICON_CLASS;
    if (!item.isSeparatorType) {
        text.textContent = item.text.replace(/&/g, '');
        shortcut.textContent = item.shortcut;
    }
    node.appendChild(icon);
    node.appendChild(text);
    node.appendChild(shortcut);
    node.appendChild(submenu);
    return node;
}
function createItemNode ( item ) { var node = document . createElement ( 'div' ) ; var icon = document . createElement ( 'span' ) ; var text = document . createElement ( 'span' ) ; var shortcut = document . createElement ( 'span' ) ; var submenu = document . createElement ( 'span' ) ; node . className = createItemClassName ( item ) ; icon . className = exports . ICON_CLASS ; text . className = exports . TEXT_CLASS ; shortcut . className = exports . SHORTCUT_CLASS ; submenu . className = exports . SUBMENU_ICON_CLASS ; if ( ! item . isSeparatorType ) { text . textContent = item . text . replace ( / & / g , '' ) ; shortcut . textContent = item . shortcut ; } node . appendChild ( icon ) ; node . appendChild ( text ) ; node . appendChild ( shortcut ) ; node . appendChild ( submenu ) ; return node ; }
Create the DOM node for a MenuItem.
Create the DOM node for a MenuItem .