Reload a stylesheet.

@param {String} href The URL of the stylesheet to be reloaded.
173071
function reloadStylesheet(href) {
      var newHref = stylesheets[href].href +
            (href.indexOf("?") >= 0 ? "&" : "?") +
            "_vogue_nocache=" + (new Date).getTime(),
          stylesheet;
      // Check if the appropriate DOM Node is there.
      if (!stylesheets[href].setAttribute) {
        // Create the link.
        stylesheet = document.createElement("link");
        stylesheet.setAttribute("rel", "stylesheet");
        stylesheet.setAttribute("href", newHref);
        head.appendChild(stylesheet);

        // Update the reference to the newly created link.
        stylesheets[href] = stylesheet;
      } else {
        // Update the href to the new URL.
        stylesheets[href].href = newHref;
      }
    }
2127
function( cb ){
			var resolvedHref = ss.href;
			var i = sheets.length;
			while( i-- ){
				if( sheets[ i ].href === resolvedHref ){
					return cb();
				}
			}
			setTimeout(function() {
				onloadcssdefined( cb );
			});
		}
297976
function refresh(force) {
        if (force) {
            currentTheme = null;
        }

        $.when(force && loadCurrentTheme()).done(function () {
            var editor = EditorManager.getActiveEditor();
            if (!editor || !editor._codeMirror) {
                return;
            }

            var cm = editor._codeMirror;
            ThemeView.updateThemes(cm);

            // currentTheme can be undefined, so watch out
            cm.setOption("addModeClass", !!(currentTheme && currentTheme.addModeClass));
        });
    }
483116
public function reload()
    {
        $this->configuration = null;

        $this->load($this->domDocument, $this->cachePath, $this->xmlSchemaFile);
    }
1165771
function _load(url) {

    var script = document.createElement('script'),
      done = false;
    script.src = url;

    // Once the script has been loaded remove the tag from the document.
    script.onload = script.onreadystatechange = function() {
      if ( !done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") ) {
        done = true;
        script.onload = script.onreadystatechange = null;
        if ( script && script.parentNode ) {
          script.parentNode.removeChild( script );
        }
      }
    };

    if ( !head ) {
      head = document.getElementsByTagName('head')[0];
    }

    // Actually load script.
    head.appendChild( script );
  }
186901
function addLinkedStyleSheet(url, deferred) {
        var attributes = {
            type: "text/css",
            rel:  "stylesheet",
            href: url
        };

        var $link = $("<link/>").attr(attributes);

        if (deferred) {
            $link.on('load', deferred.resolve).on('error', deferred.reject);
        }

        $link.appendTo("head");

        return $link[0];
    }
1310140
function injectCss(cssList, content) {
        var css = cssList.reduce(function (prev, now) {
            var uri = now.uri;
            return prev + '<link rel="stylesheet" type="text/css" href="' + uri + '">\r\n';
        }, '');
        if (content.indexOf(settings.styleTag) !== -1) {
            content = content.replace(settings.styleTag, css);
        }
        else {
            content = content.replace(/<\/head>/, css + '\n$&');
        }
        return content;
    }
297004
function updateHtml(href) {
    var fragment = generator.fragment$[href];
    if (!fragment) return generator.emit('notify', 'Oops, jqueryview cannot find fragment: ' + href);

    var $html = $('[data-render-html="' + href + '"]');
    if (!$html.length) return generator.emit('notify', 'Oops, jqueryview cannot update html for fragment: ' + href);

    $html.html(generator.renderHtml(fragment));
    log('jqueryview updateHtml', location.pathname, location.search, location.hash);
    generator.emit('update-view', location.pathname, location.search, location.hash, window, $html);
  }
1270095
public void setStylesheet(FileResource stylesheet) {
        this.log("Setting custom stylesheet " + stylesheet.toString(), LogLevel.DEBUG.getLevel());
        this.stylesheet = stylesheet;
    }
288655
function (selector, incremental) {
        if (!selector) {
            if (incremental) {
                // Everything was removed
                refreshCSS();
            } else {
                // Nothing was be removed
                return;
            }
        } else {
            // Simply put back the original style
            aria.templates.CSSMgr.__textLoaded[selector.location].text = selector.original;
            refreshCSS();
        }
    }
663091
function Stylesheet() {
  var styleElement = document.createElement('style'),
    head = document.getElementsByTagName('head')[0];

  head.appendChild(styleElement);

  // Safari does not see the new stylesheet unless you append something.
  // However!  IE will blow chunks, so ... filter it thusly:
  if (!window.createPopup) {
    styleElement.appendChild(document.createTextNode(''));
  }

  this.sheet = document.styleSheets[document.styleSheets.length - 1];
}
159571
public void setHref(String href) {
        JQMCommon.setAttribute(a, "href", href);
        if (external == null /*only if not explicitly set*/ && !Empty.is(href)
                && (href.startsWith("http:") || href.startsWith("https:"))) {
            setExternal(true);
        }
    }
1160367
function loadCSS(url, callback, fail) {
        var node = DOC.createElement('link');
        node.rel = 'stylesheet';
        node.type = "text/css";

        cssCallback(node, callback, fail);

        node.href = url;
        HEAD.insertBefore(node, BASEELEMENT);
        return $;
    }
420308
function () {
                var added = {},
                    current,
                    newStatus;

                current = this.stylesheets;
                newStatus = related().stylesheets;

                Object.keys(newStatus).forEach(function (v, i) {
                    if (!current[v]) {
                        added[v] = newStatus[v];
                    }
                });

                Object.keys(added).forEach(function (v, i) {
                    _transport.send(JSON.stringify({
                        method: "StylesheetAdded",
                        href: v,
                        roots: [added[v]]
                    }));
                });

                this.stylesheets = newStatus;
            }
470814
public function setHref($href)
    {
        if (StringHelper::startsWith($href, '//')) {
            $this->_href = Url::base(true) . str_replace('//', '/', $href);
        } else {
            $this->_href = Url::ensureHttp($href);
        }
    }
928890
function(styles, cb) {
			// Reduce the list to styles that haven't been loaded
			var existingStyles = _findExistingStyles();
			styles = jQuery.grep(styles, function(url) {
				return url && jQuery.inArray(url, existingStyles) === -1;
			});

			// Attempt to use the user provided method
			if (_config.loadStyles) {
				return _config.loadStyles(styles, cb);
			}

			// load styles, see #101
			var stylesFragment = null,
				useCreateStyleSheet = !!document.createStyleSheet;

			jQuery.each(styles, function(i, resourceUrl) {
				if (useCreateStyleSheet) {
					document.createStyleSheet(resourceUrl);
				}
				else {
					stylesFragment = stylesFragment || [];
					stylesFragment.push('<link rel="stylesheet" type="text/css" href="' + resourceUrl + '"/>');
				}
			});

			if (stylesFragment) {
				jQuery('head').append(stylesFragment.join(''));
			}

			cb();
		}
1220904
def _update_stylesheet(self, widget):
        """"""
        if is_dark_interface():
            css = qdarkstyle.load_stylesheet_from_environment()
            widget.setStyleSheet(css)
            palette = widget.palette()
            background = palette.color(palette.Window).lighter(150).name()
            border = palette.color(palette.Window).lighter(200).name()
            name = widget.__class__.__name__
            widget.setObjectName(name)
            extra_css = '''
                {0}#{0} {{
                    background-color:{1};
                    border: 1px solid {2};
                }}'''.format(name, background, border)
            widget.setStyleSheet(css + extra_css)