Socket
Socket
Sign inDemoInstall

style-mod

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

style-mod - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

2

package.json
{
"name": "style-mod",
"version": "4.0.2",
"version": "4.0.3",
"description": "A minimal CSS module shim",

@@ -5,0 +5,0 @@ "main": "dist/style-mod.cjs",

@@ -83,16 +83,18 @@ const C = "\u037c"

let adoptedSet = null
let adoptedSet = new Map //<Document, StyleSet>
class StyleSet {
constructor(root) {
if (!root.head && root.adoptedStyleSheets && typeof CSSStyleSheet != "undefined") {
if (adoptedSet) {
root.adoptedStyleSheets = [adoptedSet.sheet, ...root.adoptedStyleSheets]
return root[SET] = adoptedSet
let doc = root.ownerDocument || root, win = doc.defaultView
if (!root.head && root.adoptedStyleSheets && win.CSSStyleSheet) {
let adopted = adoptedSet.get(doc)
if (adopted) {
root.adoptedStyleSheets = [adopted.sheet, ...root.adoptedStyleSheets]
return root[SET] = adopted
}
this.sheet = new CSSStyleSheet
this.sheet = new win.CSSStyleSheet
root.adoptedStyleSheets = [this.sheet, ...root.adoptedStyleSheets]
adoptedSet = this
adoptedSet.set(doc, this)
} else {
this.styleTag = (root.ownerDocument || root).createElement("style")
this.styleTag = doc.createElement("style")
let target = root.head || root

@@ -99,0 +101,0 @@ target.insertBefore(this.styleTag, target.firstChild)

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