fix: Adds type attr. to the generated link element

Although the rel element is set to stylesheet the created link element does not specify the MIME type of the linked resource.
The MIME type is set to text/css similar to the case when an style element is created. This change also syncs with the addStylesUrl.js behavior where the type attribute is set.
master
Dimitar Ivanov 2017-02-24 15:10:40 +02:00 committed by Joshua Wiens
parent e280cb6bd9
commit 2a2f261ef9
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ function createStyleElement(options) {
function createLinkElement(options) {
var linkElement = document.createElement("link");
linkElement.rel = "stylesheet";
linkElement.type = "text/css";
insertStyleElement(options, linkElement);
return linkElement;
}