1.1.1 • Published 10 years ago

dapp-sandbox v1.1.1

Weekly downloads
7
License
ISC
Repository
github
Last release
10 years ago

DappSandbox

var sandbox = new DappSandbox({
  container: document.body,
})

sandbox.navigateTo('https://happydapp.com/toothpaste')

api

new DappSandbox(opts)
opts = {
  container: document.body,
}

Will inject an iframe into the container.

sandbox.iframe

The iframe element.

sandbox.navigateTo(url)

navigates the sandbox to url, may trigger url event.

sandbox.on('url', function(url){...})

emitted when the url changes

sandbox.on('tx', function(tx, cb){...})

emitted when a tx is requested to be signed