Skip to content

matthojo/on-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OnPrint

Provides the ablity to run functions before and after a print request.

Usage

Initiate OnPrint

var OnPrint = require('on-print')
  , printListener = new OnPrint()

Add a function to run before print

printListener.on('before', fn)

Add a function to run after print

printListener.on('after', fn)

Start watching for print events

printListener.start()

Browser Support

IE 5+, Firefox 6+, Chrome 9+, and Safari 5.1+ (not Opera)

License

BSD

Authors / Contributors

Matthew Harrison-Jones, Ben Gourley

Adapted from: http://tjvantoll.com/2012/06/15/detecting-print-requests-with-javascript/

About

Provides the ability to run functions before and after a print request.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published