New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-shadow

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-shadow - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

bower.json
{
"name": "react-shadow",
"version": "0.2.4",
"version": "0.2.5",
"homepage": "https://github.com/Wildhoney/ReactShadow",

@@ -5,0 +5,0 @@ "authors": [

@@ -205,6 +205,10 @@ (function main($window, $document) {

// Export the module attached to the `$window` element or as a CommonJS module.
var root = typeof exports !== 'undefined' && exports !== null ? exports : $window;
root.ReactShadow = ReactShadow;
// Export the module as a CommonJS module if possible
if (typeof module !== 'undefined' && module != null) {
module.exports = ReactShadow;
return;
}
})(window, window.document);
$window.ReactShadow = ReactShadow;
})(window, window.document);

@@ -205,6 +205,10 @@ (function main($window, $document) {

// Export the module attached to the `$window` element or as a CommonJS module.
var root = typeof exports !== 'undefined' && exports !== null ? exports : $window;
root.ReactShadow = ReactShadow;
// Export the module as a CommonJS module if possible
if (typeof module !== 'undefined' && module != null) {
module.exports = ReactShadow;
return;
}
})(window, window.document);
$window.ReactShadow = ReactShadow;
})(window, window.document);

@@ -1,1 +0,1 @@

!function(t,e){"use strict";var n;n="function"==typeof require?require("react"):t.React;var o="data-reactid",i="main",r={_shadowRoot:{},componentDidMount:function(){var t=this._shadowRoot=this.getDOMNode().parentNode.createShadowRoot(),o=e.createElement(i);this._attachCSS(t),t.appendChild(o),n.render(this.render(),o),this._interceptEvents();var r=e.createElement("script");this.getDOMNode().parentNode.appendChild(r),r.appendChild(this.getDOMNode())},componentDidUpdate:function(){var t=this._shadowRoot.querySelector(i);n.render(this.render(),t)},_attachCSS:function(t){this.cssDocuments&&this._attachCSSDocuments(t),this.cssSource&&this._attachCSSSource(t)},_interceptEvents:function(){var t=this.getDOMNode().getAttribute(o),n=this.getDOMNode().parentNode,i=function(i){i.stopPropagation();var r=i.target.getAttribute(o);if(r){var s=r.replace(/\.[0-9]+/,t),a=n.querySelector("*["+o+'="'+s+'"]');i.target.value&&a.setAttribute("value",i.target.value);var c=e.createEvent("Events");c.initEvent(i.type,!0,!1),a.dispatchEvent(c)}}.bind(this),r=["click","dblclick","mouseup","mouseout","mouseover","mousedown","mouseenter","mouseleave","contextmenu","keyup","keydown","change"];r.forEach(function(t){this._shadowRoot.addEventListener(t,i)}.bind(this))},_createStyle:function(t,n){var o=e.createElement("style");return o.innerHTML=n,t.appendChild(o),t},_attachCSSSource:function(t){this._createStyle(t,this.cssSource)},_attachCSSDocuments:function(t){var e=this;if(this.cssDocuments){var n="function"==typeof this.cssDocuments,o=n?this.cssDocuments():this.cssDocuments;o.forEach(function(n){e._createStyle(t,'@import "'+n+'"')})}return t}},s="undefined"!=typeof exports&&null!==exports?exports:t;s.ReactShadow=r}(window,window.document);
!function(t,e){"use strict";var n;n="function"==typeof require?require("react"):t.React;var o="data-reactid",i="main",r={_shadowRoot:{},componentDidMount:function(){var t=this._shadowRoot=this.getDOMNode().parentNode.createShadowRoot(),o=e.createElement(i);this._attachCSS(t),t.appendChild(o),n.render(this.render(),o),this._interceptEvents();var r=e.createElement("script");this.getDOMNode().parentNode.appendChild(r),r.appendChild(this.getDOMNode())},componentDidUpdate:function(){var t=this._shadowRoot.querySelector(i);n.render(this.render(),t)},_attachCSS:function(t){this.cssDocuments&&this._attachCSSDocuments(t),this.cssSource&&this._attachCSSSource(t)},_interceptEvents:function(){var t=this.getDOMNode().getAttribute(o),n=this.getDOMNode().parentNode,i=function(i){i.stopPropagation();var r=i.target.getAttribute(o);if(r){var a=r.replace(/\.[0-9]+/,t),c=n.querySelector("*["+o+'="'+a+'"]');i.target.value&&c.setAttribute("value",i.target.value);var s=e.createEvent("Events");s.initEvent(i.type,!0,!1),c.dispatchEvent(s)}}.bind(this),r=["click","dblclick","mouseup","mouseout","mouseover","mousedown","mouseenter","mouseleave","contextmenu","keyup","keydown","change"];r.forEach(function(t){this._shadowRoot.addEventListener(t,i)}.bind(this))},_createStyle:function(t,n){var o=e.createElement("style");return o.innerHTML=n,t.appendChild(o),t},_attachCSSSource:function(t){this._createStyle(t,this.cssSource)},_attachCSSDocuments:function(t){var e=this;if(this.cssDocuments){var n="function"==typeof this.cssDocuments,o=n?this.cssDocuments():this.cssDocuments;o.forEach(function(n){e._createStyle(t,'@import "'+n+'"')})}return t}};return"undefined"!=typeof module&&null!=module?void(module.exports=r):void(t.ReactShadow=r)}(window,window.document);
{
"name": "react-shadow",
"version": "0.2.4",
"version": "0.2.5",
"description": "Use Shadow DOM with React.js and CSS imports; write your component styles in CSS!",

@@ -5,0 +5,0 @@ "main": "dist/react-shadow.min.js",

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