url-sandbox

1.0.10 • Public • Published

url-sandbox

Run scripts in an URL, based on JSDOM.

Usage

First, install the package:

npm install url-sandbox

Then, use it like this:

var sandbox=require('url-sandbox');
sandbox.runCode('https://example.com', function(){
  console.log(document.body.innerHTML)
});

This will log the innerHTML of the website. In JSDOM, it would usually only change the location but not the HTML.

Readme

Keywords

Package Sidebar

Install

npm i url-sandbox

Weekly Downloads

2

Version

1.0.10

License

ISC

Unpacked Size

3.4 MB

Total Files

6

Last publish

Collaborators

  • diegab