HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/ZelfVerkopen/zelfverkopen.nl/node_modules/style-loader/lib/addStyleUrl.js
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

function addAttrs (element, attrs) {
	Object.keys(attrs).forEach(function (key) {
		element.setAttribute(key, attrs[key]);
	});
}

module.exports = function addStyleUrl (url, options) {
	if (typeof DEBUG !== "undefined" && DEBUG) {
		if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};

	options.attrs = typeof options.attrs === "object" ? options.attrs : {};

	var link = document.createElement("link");

	link.rel = "stylesheet";
	link.type = "text/css";
	link.href = url;

	addAttrs(link, options.attrs);

	var head = document.getElementsByTagName("head")[0];

	head.appendChild(link);

	if (module.hot) {
		return function(url) {
			if(typeof url === "string") {
				link.href = url;
			} else {
				head.removeChild(link);
			}
		};
	}
}