browser-module-sandbox
Advanced tools
Comparing version 1.3.7 to 1.3.9
@@ -15,2 +15,3 @@ var inherits = require('inherits') | ||
if (!opts) opts = {} | ||
this.name = opts.name | ||
this.container = opts.container || document.body | ||
@@ -28,2 +29,4 @@ this.iframeHead = opts.iframeHead || "" | ||
inherits(Sandbox, events.EventEmitter) | ||
Sandbox.prototype.bundle = function(entry, preferredVersions) { | ||
@@ -105,5 +108,6 @@ if (!preferredVersions) preferredVersions = {} | ||
'<script type="text/javascript" src="data:text/javascript;charset=UTF-8,' | ||
+ encodeURIComponent('setTimeout(function(){' + script + '}, 0)') | ||
+ encodeURIComponent('setTimeout(function(){\n;' + script + '\n;}, 0)') | ||
+ '"></script>' | ||
var html = { head: self.iframeHead + self.iframeStyle, body: body, script: script } | ||
if (self.name) html.name = self.name | ||
self.iframe.setHTML(html) | ||
@@ -113,3 +117,1 @@ self.emit('bundleEnd', html) | ||
} | ||
inherits(Sandbox, events.EventEmitter) |
{ | ||
"name": "browser-module-sandbox", | ||
"version": "1.3.7", | ||
"version": "1.3.9", | ||
"description": "uses browserify-cdn to run node code in an iframe", | ||
@@ -10,7 +10,7 @@ "repository": { | ||
"dependencies": { | ||
"iframe": "~0.0.2", | ||
"inherits": "~1.0.0", | ||
"detective": "~2.1.2", | ||
"browser-module-cache": "~0.1.3", | ||
"browser-request": "~0.3.1" | ||
"browser-request": "~0.3.3", | ||
"detective": "^4.0.0", | ||
"iframe": "^0.3.1", | ||
"inherits": "^2.0.1" | ||
}, | ||
@@ -17,0 +17,0 @@ "bugs": { |
@@ -15,3 +15,3 @@ # browser-module-sandbox | ||
```javascript | ||
var sandbox = require('browser-module-sandbox') | ||
var Sandbox = require('browser-module-sandbox') | ||
``` | ||
@@ -24,3 +24,4 @@ | ||
```javascript | ||
var sandbox = sandbox({ | ||
var sandbox = Sandbox({ | ||
name: iframe name attribute, | ||
cdn: 'http://localhost:8000', // browserify-cdn API endpoint, defaults to the current browser domain root, | ||
@@ -27,0 +28,0 @@ container: dom element where the iframe should be appended, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5406
94
59
+ Addedacorn@5.7.4(transitive)
+ Addeddefined@1.0.1(transitive)
+ Addeddetective@4.7.1(transitive)
+ Addediframe@0.3.1(transitive)
+ Addedinherits@2.0.4(transitive)
- Removeddetective@2.1.2(transitive)
- Removedescodegen@0.0.15(transitive)
- Removedesprima@1.0.2(transitive)
- Removediframe@0.0.2(transitive)
- Removedinherits@1.0.2(transitive)
- Removedsource-map@0.7.4(transitive)
Updatedbrowser-request@~0.3.3
Updateddetective@^4.0.0
Updatediframe@^0.3.1
Updatedinherits@^2.0.1