<title>Function Binding Example</title>
<script type="text/javascript" src="/upload/files/201702/EventUtil.js"></script>
<p>This only works in browsers that natively support <code>Function.prototype.bind()</code>.</p>
<input type="button" id="my-btn" value="Click Me" />
<script type="text/javascript">
message: "Event handled",
handleClick: function(event){
alert(this.message + ":" + event.type);
var btn = document.getElementById("my-btn");
EventUtil.addHandler(btn, "click", handler.handleClick.bind(handler));