src/aria/templates/CSSMgr.js
function (tagName) {

            // A pointer to the style might be already there or an element with the correct id might be there
            var tag = this.__styleTagPool[tagName];

            if (!tag) {
                var id = this.__TAG_PREFX + tagName;
                tag = ariaUtilsDom.getElementById(id);

                if (!tag) {
                    // If missing, create one
                    var document = Aria.$window.document;
                    var head = document.getElementsByTagName("head")[0];
                    tag = document.createElement("style");

                    tag.id = id;
                    tag.type = "text/css";
                    tag.media = "all"; // needed as the default media is screen in FF but all in IE

                    head.appendChild(tag);
                    tag = head.lastChild;
                }

                this.__styleTagPool[tagName] = tag;
            }
            return tag;
        }
function (tagName) {

            // A pointer to the style might be already there or an element with the correct id might be there
            var tag = this.__styleTagPool[tagName];

            if (!tag) {
                var id = this.__TAG_PREFX + tagName;
                tag = ariaUtilsDom.getElementById(id);

                if (!tag) {
                    // If missing, create one
                    var document = Aria.$window.document;
                    var head = document.getElementsByTagName("head")[0];
                    tag = document.createElement("style");

                    tag.id = id;
                    tag.type = "text/css";
                    tag.media = "all"; // needed as the default media is screen in FF but all in IE

                    head.appendChild(tag);
                    tag = head.lastChild;
                }

                this.__styleTagPool[tagName] = tag;
            }
            return tag;
        }
function ( tagName ) { // A pointer to the style might be already there or an element with the correct id might be there var tag = this . __styleTagPool [ tagName ] ; if ( ! tag ) { var id = this . __TAG_PREFX + tagName ; tag = ariaUtilsDom . getElementById ( id ) ; if ( ! tag ) { // If missing, create one var document = Aria . $window . document ; var head = document . getElementsByTagName ( "head" ) [ 0 ] ; tag = document . createElement ( "style" ) ; tag . id = id ; tag . type = "text/css" ; tag . media = "all" ; // needed as the default media is screen in FF but all in IE head . appendChild ( tag ) ; tag = head . lastChild ; } this . __styleTagPool [ tagName ] = tag ; } return tag ; }
Get the HTMLElement associated to a tag id. If it is missing it will be added to the DOM
@param {String} tagName Id of the tag
@return {HTMLElement} style tag
@private
Get the HTMLElement associated to a tag id . If it is missing it will be added to the DOM