nightmare-hook

0.1.1 • Public • Published

nightmare-hook

Hook into each nightmare action and emit events with useful information about the current state.

Installation

$ npm install nightmare-hook

Usage

 
Nightmare = events(Nightmare)
var nightmare = new Nightmare
 
var emit = hook(nightmare)
 
// will get called after .viewport()
emit('viewport', function () {
  return this.page.viewportSize
})
 
nightmare
  .goto('http://google.com')
  .viewport('1000', '1000')
  .run(function (err, nightmare) {
    if (err) throw err;
  })

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i nightmare-hook

Weekly Downloads

2

Version

0.1.1

License

none

Last publish

Collaborators

  • queckezz