From 2a2f261ef9f6ceabd6677ef870d24d4b0d2aad19 Mon Sep 17 00:00:00 2001 From: Dimitar Ivanov Date: Fri, 24 Feb 2017 15:10:40 +0200 Subject: [PATCH] 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. --- addStyles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addStyles.js b/addStyles.js index 8d452779..bfbae60b 100644 --- a/addStyles.js +++ b/addStyles.js @@ -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; }