Skip to content

Easy to use and small module script for in-browser usage.

License

Notifications You must be signed in to change notification settings

GameplayJDK/small-module-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

small-module-js

Easy to use and small module script for in-browser usage.

Installation

npm install --save small-module-js

Usage

Module('App.Test', (function () {
    // Set variables for the scope:
    var container = document.querySelector('div#container');

    function handleClick(event) {
        console.log(event);
    }

    function registerEvent() {
        container.addEventListener('click', handleClick);
    }

    // Do everything for initialization:
    function initialize() {
        registerEvent();
    }

    return {
        initialize: initialize,
    };
}));

License

It's MIT.

About

Easy to use and small module script for in-browser usage.

Resources

License

Stars

Watchers

Forks

Packages

No packages published