You can work around this problem by storing references to functions:
import js.Lib; import js.Dom; class Main { static var but1:js.Button; static var but2:js.Button; static var myHandler:js.Event->Void; public static function main(): Void { but1 = cast Lib.document.getElementById("button1"); but2 = cast Lib.document.getElementById("button2"); myHandler = clickHandler; untyped but1.addEventListener("click", myHandler); but2.onclick = removeHandler; } public static function clickHandler(ev : js.Event) { js.Lib.alert("You've clcked."); } public static function removeHandler(ev:js.Event) { untyped but1.removeEventListener("click", myHandler); } }