function createIconDOM(sIcon, options = {})
{
    // 0. default the class
    options.class = options.class || '';

    // 1. create our element
    let elI = document.createElement('i');
    elI.className = `i i-${sIcon} ${options.class}`;

    // 2. if we have a title
    if (options.title !== undefined)
    {
        elI.setAttribute('title', options.title);
    }
    else
    {
        // we don’t so hide the icon from AT
        elI.setAttribute('aria-hidden', 'true');
    }

    return elI;
}
/**
 * Creates an HTMLElement representing an icon. This creates an I element, with the appropriate classes.
 *
 * @param   {string} sIcon - the icon to embed
 * @param   {Object} options - any additional options you wish to be passed to the icon
 * @return  {HTMLElement} the icon as an HTMLElement
 */
Creates an HTMLElement representing an icon. This creates an I element, with the appropriate classes.
@param   {string} sIcon - the icon to embed
@param   {Object} options - any additional options you wish to be passed to the icon
@return  {HTMLElement} the icon as an HTMLElement
Creates an HTMLElement representing an icon . This creates an I element with the appropriate classes . @param { string } sIcon - the icon to embed @param { Object } options - any additional options you wish to be passed to the icon @return { HTMLElement } the icon as an HTMLElement
function createIconDOM(sIcon, options = {})
{
    options.class = options.class || '';
    let elI = document.createElement('i');
    elI.className = `i i-${sIcon} ${options.class}`;
    if (options.title !== undefined)
    {
        elI.setAttribute('title', options.title);
    }
    else
    {
        elI.setAttribute('aria-hidden', 'true');
    }
    return elI;
}
function createIconDOM ( sIcon , options = { } ) { options . class = options . class || '' ; let elI = document . createElement ( 'i' ) ; elI . className = ` ${ sIcon } ${ options . class } ` ; if ( options . title !== undefined ) { elI . setAttribute ( 'title' , options . title ) ; } else { elI . setAttribute ( 'aria-hidden' , 'true' ) ; } return elI ; }
Creates an HTMLElement representing an icon.
Creates an HTMLElement representing an icon .
// 0. default the class // 1. create our element // 2. if we have a title // we don’t so hide the icon from AT