Socket
Socket
Sign inDemoInstall

fg-loadcss

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fg-loadcss - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

test/body.html

35

loadCSS.js

@@ -22,9 +22,3 @@ /*!

else {
var refs;
if( doc.querySelectorAll ){
refs = doc.querySelectorAll( "style,link[rel=stylesheet],script" );
}
else {
refs = ( doc.body || doc.getElementsByTagName( "head" )[ 0 ] ).childNodes;
}
var refs = ( doc.body || doc.getElementsByTagName( "head" )[ 0 ] ).childNodes;
ref = refs[ refs.length - 1];

@@ -44,17 +38,13 @@ }

// A method (exposed on return object for external use) that mimics onload by polling until document.styleSheets until it includes the new sheet.
var onloadcssdefined = function ( cb ){
var defined;
for( var i = 0; i < sheets.length; i++ ){
var sheet = sheets[i];
if( sheet.href && sheet.href === ss.href ){
defined = true;
var onloadcssdefined = function( cb ){
var resolvedHref = ss.href;
var i = sheets.length;
while( i-- ){
if( sheets[ i ].href === resolvedHref ){
return cb();
}
}
if( defined ){
cb();
} else {
setTimeout(function() {
onloadcssdefined( cb );
});
}
setTimeout(function() {
onloadcssdefined( cb );
});
};

@@ -69,2 +59,7 @@

};
// commonjs
if( module ){
module.exports = w.loadCSS;
}
}(this));
{
"name": "fg-loadcss",
"version": "0.2.0",
"version": "0.2.1",
"description": "A function for loading CSS asynchronously",

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

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc