seu-utils

    0.2.1 • Public • Published

    seu-utils

    A simple utility module for cross browsers.

    Usage

    1. Import the seu-util.js file in your html:
    <script src="lib/seu-util.js"></script>
    1. Using the utility functions:
    var myBtn = document.querySelector('#myBtn');
    SeuUtil.event.addHandler(myBtn, 'click', function (event) {
      console.log(event.type);
      alert(this.value);
    });

    API

    SeuUtil.event

    1. addHandler(element, type, handler)
    2. removeHandler(element, type, handler)
    3. getTarget(event)
    4. preventDefault(event)
    5. stopPropagation(event)

    Keywords

    none

    Install

    npm i seu-utils

    DownloadsWeekly Downloads

    1

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • wwsun