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.1.1 to 0.1.2

4

index.js
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Frame=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/** @jsx React.DOM */
var Frame = React.createClass({displayName: 'Frame',
propTypes: {
style: React.PropTypes.object,
head: React.PropTypes.object
},
render: function() {

@@ -5,0 +9,0 @@ return this.transferPropsTo(React.DOM.iframe(null ));

2

package.json
{
"name": "react-frame-component",
"version": "0.1.1",
"version": "0.1.2",
"description": "React component to wrap your application or component in an iFrame for encapsulation purposes",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,3 +20,3 @@ # React &lt;Frame /> component

Go check out the demos.
Go check out the [demo] [demo-url].

@@ -62,1 +62,3 @@ ```html

[demo-url]: http://ryanseddon.github.io/react-frame-component/

@@ -5,3 +5,3 @@ /** @jsx React.DOM */

var ReactTestUtils;
var ReactTestUtils, div;

@@ -13,2 +13,9 @@ describe("Frame test",function(){

afterEach(function() {
if(div) {
div.parentNode.removeChild(div);
div = null;
}
});
it("should create an empty iFrame", function () {

@@ -27,4 +34,4 @@ var frame = ReactTestUtils.renderIntoDocument(<Frame />);

it("should create an iFrame with a <link> tag inside", function () {
var div = document.body.appendChild(document.createElement('div')),
frame = React.renderComponent(<Frame head={
div = document.body.appendChild(document.createElement('div'));
var frame = React.renderComponent(<Frame head={
<link href='styles.css' />

@@ -39,4 +46,4 @@ } />, div),

it("should create an iFrame with a <script> and insert children", function () {
var div = document.body.appendChild(document.createElement('div')),
frame = React.renderComponent(<Frame head={
div = document.body.appendChild(document.createElement('div'));
var frame = React.renderComponent(<Frame head={
<script src="foo.js"></script>

@@ -56,4 +63,4 @@ }>

it("should encapsulate styles and not effect elements outside", function () {
var div = document.body.appendChild(document.createElement('div')),
component = React.renderComponent(<div>
div = document.body.appendChild(document.createElement('div'));
var component = React.renderComponent(<div>
<p>Some text</p>

@@ -60,0 +67,0 @@ <Frame head={

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