Nostradamus Predicting Maelstroms
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    dom-event-streampublic

    dom-event-stream

    A streams2-compatible stream of DOMEvents over time.

     
    var events = require('dom-event-stream')
     
    var replace = require('dom-replace-html-stream')
     
    events(document.querySelector('#source'), 'keyup')
      .pipe(replace(document.querySelector('#source')))

    API

    events(DOMElement, eventName, eventStreamOptions={}) -> EventStream

    Create a readable stream of DOMEvents intercepted by DOMElement for eventName.

    eventStreamOptions

    The options available are as follows:

    • useCapture: determines whether the bound event listener will be in capture mode or not.
    • preventDefault: A boolean or a function accepting a DOMEvent and returning a boolean value.
    • stopPropagation: A boolean or a function accepting a DOMEvent and returning a boolean value.

    EventStream#close -> undefined

    Close the stream and remove the EventHandler from the DOM.

    License

    MIT

    Keywords

    none

    install

    npm i dom-event-stream

    Downloadslast 7 days

    1

    version

    0.0.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar