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

react-frame-component

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-frame-component - npm Package Compare versions

Comparing version 4.1.3 to 5.0.0-alpha.0

24

lib/Frame.js

@@ -49,7 +49,12 @@ 'use strict';

_this.setRef = function (node) {
_this.node = node;
};
_this.handleLoad = function () {
_this.forceUpdate();
_this.setState({ iframeLoaded: true });
};
_this._isMounted = false;
_this.state = { iframeLoaded: false };
return _this;

@@ -125,8 +130,2 @@ }

if (doc.body.children.length < 1) {
doc.open('text/html', 'replace');
doc.write(this.props.initialContent);
doc.close();
}
var mountTarget = this.getMountTarget();

@@ -139,5 +138,4 @@

value: function render() {
var _this2 = this;
var props = _extends({}, this.props, {
srcDoc: this.props.initialContent,
children: undefined // The iframe isn't ready so we drop children from props here. #12, #17

@@ -152,8 +150,4 @@ });

'iframe',
_extends({}, props, {
ref: function ref(node) {
_this2.node = node;
}
}),
this.renderFrameContents()
_extends({}, props, { ref: this.setRef, onLoad: this.handleLoad }),
this.state.iframeLoaded && this.renderFrameContents()
);

@@ -160,0 +154,0 @@ }

{
"name": "react-frame-component",
"version": "4.1.3",
"version": "5.0.0-alpha.0",
"description": "React component to wrap your application or component in an iFrame for encapsulation purposes",

@@ -25,2 +25,5 @@ "main": "lib/index.js",

},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"repository": {

@@ -79,4 +82,4 @@ "type": "git",

"prop-types": "^15.5.9",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"rimraf": "^2.5.4",

@@ -83,0 +86,0 @@ "sinon": "2.0.0-pre",

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