src/js/common/util.js
function(id, cssString) {
        var style = document.createElement('style');

        style.type = 'text/css';
        style.id = id;

        if (style.styleSheet) {
            style.styleSheet.cssText = cssString;
        } else {
            style.appendChild(document.createTextNode(cssString));
        }

        document.getElementsByTagName('head')[0].appendChild(style);
    }
function(id, cssString) {
        var style = document.createElement('style');

        style.type = 'text/css';
        style.id = id;

        if (style.styleSheet) {
            style.styleSheet.cssText = cssString;
        } else {
            style.appendChild(document.createTextNode(cssString));
        }

        document.getElementsByTagName('head')[0].appendChild(style);
    }
function ( id , cssString ) { var style = document . createElement ( 'style' ) ; style . type = 'text/css' ; style . id = id ; if ( style . styleSheet ) { style . styleSheet . cssText = cssString ; } else { style . appendChild ( document . createTextNode ( cssString ) ) ; } document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( style ) ; }
create style element and append it into the head element.
@param {String} id - element id
@param {String} cssString - css string
create style element and append it into the head element .