Socket
Socket
Sign inDemoInstall

fg-loadcss

Package Overview
Dependencies
0
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

2

package.json
{
"name": "fg-loadcss",
"version": "1.0.0",
"version": "1.1.0",
"description": "A function for loading CSS asynchronously",

@@ -5,0 +5,0 @@ "main": "src/loadCSS.js",

@@ -28,3 +28,3 @@ # loadCSS

```html
<link rel="preload" href="path/to/mystylesheet.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="path/to/mystylesheet.css" as="stylesheet" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="path/to/mystylesheet.css"></noscript>

@@ -31,0 +31,0 @@ ```

@@ -21,3 +21,3 @@ /*! CSS rel=preload polyfill. Depends on loadCSS function. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */

var link = links[ i ];
if( link.rel === "preload" && link.getAttribute( "as" ) === "style" ){
if( link.rel === "preload" && link.getAttribute( "as" ) === "stylesheet" ){
w.loadCSS( link.href, link );

@@ -24,0 +24,0 @@ link.rel = null;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc