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

Readme

Keywords

none

Package Sidebar

Install

npm i nightmare-hook

Weekly Downloads

0

Version

0.1.1

License

none

Last publish

Collaborators

  • queckezz