Skip to content

Commit 2a2f261

Browse files
dimitarivanovjoshwiens
authored andcommitted
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.
1 parent e280cb6 commit 2a2f261

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addStyles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ function createStyleElement(options) {
136136
function createLinkElement(options) {
137137
var linkElement = document.createElement("link");
138138
linkElement.rel = "stylesheet";
139+
linkElement.type = "text/css";
139140
insertStyleElement(options, linkElement);
140141
return linkElement;
141142
}

0 commit comments

Comments
 (0)