@bendrucker/synthetic-dom-events

    0.3.0 • Public • Published

    synthetic-dom-events

    Forked to work in Node without the need for global shims (https://github.com/defunctzombie/synthetic-dom-events/pull/8)

    Build Status

    example

    var event = require('synthetic-dom-events');
     
    // event just returns a correctly created dom event object
    // you are responsible for emitting it
    var ev = event('click', { button: 2 });
     
    var element = document.createElement('button');
    element.dispatchEvent(ev);
     
    // or legacy IE
    //element.fireEvent('on' + ev.type, ev);

    Keywords

    none

    Install

    npm i @bendrucker/synthetic-dom-events

    DownloadsWeekly Downloads

    9

    Version

    0.3.0

    License

    MIT

    Last publish

    Collaborators

    • bendrucker