@@ -16,8 +16,14 @@ function on_click(e){ | |||
console.log(e.target); | |||
} | |||
function handle_emitted(){ | |||
console.log("EMITTED EVENT!"); | |||
} | |||
function initialize(DOC){ | |||
EventWindow.listen("onclick", on_click); | |||
EventWindow.enable_emitter_attributes(); | |||
EventWindow.listen("emitted-event", handle_emitted); | |||
var nespainter = new NESPainter(DOC.getElementById("painter")); | |||
@@ -16,7 +16,7 @@ | |||
<div class="home-menu pure-menu pure-menu-horizontal"> | |||
<a class="pure-menu-heading" href="">Your Site</a> | |||
<ul class="pure-menu-list"> | |||
<li class="pure-menu-item pure-menu-selected"><a href="#" class="pure-menu-link">Home</a></li> | |||
<li class="pure-menu-item pure-menu-selected"><a href="#" emit="emitted-event" class="pure-menu-link">Home</a></li> | |||
<li class="pure-menu-item"><a href="#" class="pure-menu-link">Tour</a></li> | |||
<li class="pure-menu-item"><a href="#" class="pure-menu-link">Sign Up</a></li> | |||
</ul> |