Socket
Socket
Sign inDemoInstall

browser-module-sandbox

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-module-sandbox - npm Package Compare versions

Comparing version 0.0.9 to 0.1.0

6

index.js

@@ -20,2 +20,4 @@ var inherits = require('inherits')

this.editorEl = opts.editor || document.body
this.iframeHead = opts.iframeHead || ""
this.iframeBody = opts.iframeBody || ""
this.snuggieAPI = opts.snuggieAPI || window.location.protocol + '//' + window.location.host

@@ -37,4 +39,4 @@ this.showControls(opts.controls)

// setTimeout is because iframes report inaccurate window.innerWidth/innerHeight, even after DOMContentLoaded!
var body = '<script type="text/javascript"> setTimeout(function(){' + json.bundle + '}, 0)</script>'
self.iframe.setHTML({ head: self.iframeStyle, body: body })
var body = self.iframeBody + '<script type="text/javascript"> setTimeout(function(){' + json.bundle + '}, 0)</script>'
self.iframe.setHTML({ head: self.iframeHead + self.iframeStyle, body: body })
self.emit('bundleEnd')

@@ -41,0 +43,0 @@ })

{
"name": "browser-module-sandbox",
"version": "0.0.9",
"version": "0.1.0",
"description": "browser editor for code that gets 'compiled' on the server with node and run on the client",

@@ -5,0 +5,0 @@ "repository": {

@@ -32,3 +32,5 @@ # browser-module-sandbox

editor: document.querySelector('#edit'),
codemirrorOptions: {}
codemirrorOptions: {},
iframeHead: string that gets prepended to the `<head>` of the output iframe,
iframeBody: string that gets prepended to the `<body>` of the output iframe
})

@@ -35,0 +37,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