file-dragger

1.0.1 • Public • Published

File-Dragger

Event Emitter that emits a 'file' event every time a file is dropped onto the drop target.

Example

var FileDragger = require('file-dragger')
var emitter = FileDragger()
emitter.on('file', function (file) {
    // do something
})

API

FileDragger(target)

Function that returns an EventEmitter. This EventEmitter will emit 'file' events when files are dropped onto target. target is a DOM element or window object. it defaults to window if nothing is passed in.

Versions

Current Tags

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

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i file-dragger

Weekly Downloads

1

Version

1.0.1

License

BSD-3-Clause

Last publish

Collaborators

  • bockit