browser.js
function(href, attributes) {
        var head = document.head || document.getElementsByTagName('head')[0];
        var link = document.createElement('link');

        link.href = href;
        link.rel = 'stylesheet';

        for (var key in attributes) {
            if ( ! attributes.hasOwnProperty(key)) {
                continue;
            }
            var value = attributes[key];
            link.setAttribute('data-' + key, value);
        }

        head.appendChild(link);
    }
function(href, attributes) {
        var head = document.head || document.getElementsByTagName('head')[0];
        var link = document.createElement('link');

        link.href = href;
        link.rel = 'stylesheet';

        for (var key in attributes) {
            if ( ! attributes.hasOwnProperty(key)) {
                continue;
            }
            var value = attributes[key];
            link.setAttribute('data-' + key, value);
        }

        head.appendChild(link);
    }
function ( href , attributes ) { var head = document . head || document . getElementsByTagName ( 'head' ) [ 0 ] ; var link = document . createElement ( 'link' ) ; link . href = href ; link . rel = 'stylesheet' ; for ( var key in attributes ) { if ( ! attributes . hasOwnProperty ( key ) ) { continue ; } var value = attributes [ key ] ; link . setAttribute ( 'data-' + key , value ) ; } head . appendChild ( link ) ; }
Create a <link> tag with optional data attributes
Create a <link > tag with optional data attributes