js/impress.js
function( index ) {
        var id = "impress-toolbar-group-" + index;
        if ( !groups[ index ] ) {
            groups[ index ] = document.createElement( "span" );
            groups[ index ].id = id;
            var nextIndex = getNextGroupIndex( index );
            if ( nextIndex === undefined ) {
                toolbar.appendChild( groups[ index ] );
            } else {
                toolbar.insertBefore( groups[ index ], groups[ nextIndex ] );
            }
        }
        return groups[ index ];
    }
function( index ) {
        var id = "impress-toolbar-group-" + index;
        if ( !groups[ index ] ) {
            groups[ index ] = document.createElement( "span" );
            groups[ index ].id = id;
            var nextIndex = getNextGroupIndex( index );
            if ( nextIndex === undefined ) {
                toolbar.appendChild( groups[ index ] );
            } else {
                toolbar.insertBefore( groups[ index ], groups[ nextIndex ] );
            }
        }
        return groups[ index ];
    }
function ( index ) { var id = "impress-toolbar-group-" + index ; if ( ! groups [ index ] ) { groups [ index ] = document . createElement ( "span" ) ; groups [ index ] . id = id ; var nextIndex = getNextGroupIndex ( index ) ; if ( nextIndex === undefined ) { toolbar . appendChild ( groups [ index ] ) ; } else { toolbar . insertBefore ( groups [ index ] , groups [ nextIndex ] ) ; } } return groups [ index ] ; }
Get the span element that is a child of toolbar, identified by index.

If span element doesn't exist yet, it is created.

Note: Because of Run-to-completion, this is not a race condition.
https://developer.mozilla.org/en/docs/Web/JavaScript/EventLoop#Run-to-completion

:param: index   Method will return the element <span id="impress-toolbar-group-{index}">
Get the span element that is a child of toolbar identified by index .