0.0.1-beta.2 • Published 2 years ago

@icreate/sandbox v0.0.1-beta.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Usage

npm i @icreate/sandbox

Features

  • SandBox:window沙箱

Importing library

You can import the generated bundle to use the whole library generated by this starter:

import SandBox from '@icreate/sanbox'

Usage

import Sandbox from '@icreate/sandbox';

const sandbox = new Sandbox();

// execute scripts in sandbox
sandbox.execScriptInSandbox('window.a = 1;console.log(window.a);');

// clear side effects added by sandbox, such as addEventListener, setInterval
sandbox.clear();