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.2.1 to 0.2.2

14

index.js

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

/** @jsx React.DOM */
var React = require('react');

@@ -8,6 +6,6 @@

style: React.PropTypes.object,
head: React.PropTypes.object
head: React.PropTypes.renderable
},
render: function() {
return this.transferPropsTo(<iframe />);
return this.transferPropsTo(React.DOM.iframe());
},

@@ -20,7 +18,5 @@ componentDidMount: function() {

if(doc && doc.readyState === 'complete') {
var contents = (
<div>
{this.props.head}
{this.props.children}
</div>
var contents = React.DOM.div(null,
this.props.head,
this.props.children
);

@@ -27,0 +23,0 @@

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

@@ -33,8 +33,9 @@ "main": "index.js",

"browserify": "^4.1.11",
"react": ">=0.11.1",
"reactify": "^0.13.1",
"vinyl-source-stream": "^0.1.1"
},
"dependencies": {
"react": "^0.10.0"
"peerDependencies": {
"react": ">=0.11.1"
}
}

@@ -60,2 +60,15 @@ /** @jsx React.DOM */

it("should create an iFrame with multiple <link> and <script> tags inside", function () {
div = document.body.appendChild(document.createElement('div'));
var frame = React.renderComponent(<Frame head={[
<link key='styles' href='styles.css' />,
<link key='foo' href='foo.css' />,
<script key='bar' src='bar.js' />
]} />, div),
body = frame.getDOMNode().contentDocument.body;
expect(body.querySelectorAll('link').length).toEqual(2);
expect(body.querySelectorAll('script').length).toEqual(1);
});
it("should encapsulate styles and not effect elements outside", function () {

@@ -62,0 +75,0 @@ div = document.body.appendChild(document.createElement('div'));

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