packages/css-themes-polyfill/src/index.js
function parseExternalLink(elem) {
    var path = elem.href;
    elem.setAttribute('data-parsed', true);
    var rawFile = new XMLHttpRequest();
    rawFile.open('GET', path, true);
    rawFile.onreadystatechange = function processStylesFile() {
      if (rawFile.readyState === 4 && (rawFile.status === 200 || rawFile.status === 0)) {
        var styleEl = document.createElement('style');
        document.head.appendChild(styleEl);

        styleEl.innerText = window.cssThemeService(rawFile.responseText);
      }
    };
    rawFile.send(null);
  }
function parseExternalLink(elem) {
    var path = elem.href;
    elem.setAttribute('data-parsed', true);
    var rawFile = new XMLHttpRequest();
    rawFile.open('GET', path, true);
    rawFile.onreadystatechange = function processStylesFile() {
      if (rawFile.readyState === 4 && (rawFile.status === 200 || rawFile.status === 0)) {
        var styleEl = document.createElement('style');
        document.head.appendChild(styleEl);

        styleEl.innerText = window.cssThemeService(rawFile.responseText);
      }
    };
    rawFile.send(null);
  }
function parseExternalLink ( elem ) { var path = elem . href ; elem . setAttribute ( 'data-parsed' , true ) ; var rawFile = new XMLHttpRequest ( ) ; rawFile . open ( 'GET' , path , true ) ; rawFile . onreadystatechange = function processStylesFile ( ) { if ( rawFile . readyState === 4 && ( rawFile . status === 200 || rawFile . status === 0 ) ) { var styleEl = document . createElement ( 'style' ) ; document . head . appendChild ( styleEl ) ; styleEl . innerText = window . cssThemeService ( rawFile . responseText ) ; } } ; rawFile . send ( null ) ; }
Load and parse external Link tags
Load and parse external Link tags