Nietzsche's Preposterous Moustache

    css3-event-wrapper

    1.1.1 • Public • Published

    css3-event-wrapper

    Wrapper for CSS3 AnimationEvent and TransitionEvent.
    honeo/css3-event-wrapper
    css3-event-wrapper

    DEMO

    Edit fiddle - JSFiddle

    Example

    $ npm i css3-event-wrapper
    const css3EvtWrap = require('css3-event-wrapper'),
    const onAnimationStart = css3EvtWrap.onAnimationStart;
     
    onAnimationStart.add(element, (e)=>{
        console.log(e.type); //animationstart
    });

    Method

    onAnimationStart.add(element, listener [,useCapture])
    onAnimationStart.remove(element, listener [,useCapture])
    onAnimationEnd.add(element, listener [,useCapture])
    onAnimationEnd.remove(element, listener [,useCapture])
    onAnimationIteration.add(element, listener [,useCapture])
    onAnimationIteration.remove(element, listener [,useCapture])
    onTransitionEnd.add(element, listener [,useCapture])
    onTransitionEnd.remove(element, listener [,useCapture])

    Reference

    EventTarget.addEventListener() - Web API Interfaces | MDN
    EventTarget.removeEventListener() - Web API Interfaces | MDN
    AnimationEvent - Web API Interfaces | MDN
    transitionend - Event reference | MDN

    Install

    npm i css3-event-wrapper

    DownloadsWeekly Downloads

    2

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • honeo