Skip to content

Commit

Permalink
fix: Adds type attr. to the generated link element
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dimitarivanov authored and joshwiens committed Mar 15, 2017
1 parent e280cb6 commit 2a2f261
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2a2f261

Please sign in to comment.