イベントオブジェクト

ステートフルJavaScript2.4

by FiNGAHOLiC

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<button id="button">click me</button>

JavaScript

$(function(){
    (new function(){
        this.appName = 'wem';
        document.getElementById('button').addEventListener('click', function(e){
            console.log($.proxy(this.appName, this));
        }, false);
    }());
});