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 0.3.3 to 0.3.4

4

index.js
var React = require('react');
var assign = require('object-assign');

@@ -9,3 +10,4 @@ var Frame = React.createClass({

render: function() {
return React.createElement('iframe', this.props);
// The iframe isn't ready so we drop children from props here. #12, #17
return React.createElement('iframe', assign({}, this.props, {children: undefined}));
},

@@ -12,0 +14,0 @@ componentDidMount: function() {

{
"name": "react-frame-component",
"version": "0.3.3",
"version": "0.3.4",
"description": "React component to wrap your application or component in an iFrame for encapsulation purposes",

@@ -39,3 +39,6 @@ "main": "index.js",

"react": ">=0.13.0"
},
"dependencies": {
"object-assign": "^3.0.0"
}
}

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

/** @jsx React.DOM */
"use strict";

@@ -27,2 +25,17 @@

it("should not pass this.props.children in iframe render", function () {
spyOn(React, 'createElement').andCallThrough();
var frame = ReactTestUtils.renderIntoDocument(
<Frame className='foo'>
<div />
</Frame>
);
expect(React.createElement).toHaveBeenCalledWith('iframe',{
children: undefined,
className: 'foo'
});
expect(frame.props.children).toBeDefined();
});
it("should create an empty iFrame and apply inline styles", function () {

@@ -29,0 +42,0 @@ var frame = ReactTestUtils.renderIntoDocument(<Frame style={{border:0}} />);

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