Browse Source

Added tests for EvenWindow's emit attribute ability.

dev-tmpl
Bryan Miller 6 years ago
parent
commit
7eb56e2374
2 changed files with 7 additions and 1 deletions
  1. +6
    -0
      app/js/main.js
  2. +1
    -1
      index.html

+ 6
- 0
app/js/main.js View File

console.log(e.target); console.log(e.target);
} }


function handle_emitted(){
console.log("EMITTED EVENT!");
}

function initialize(DOC){ function initialize(DOC){
EventWindow.listen("onclick", on_click); EventWindow.listen("onclick", on_click);
EventWindow.enable_emitter_attributes();
EventWindow.listen("emitted-event", handle_emitted);


var nespainter = new NESPainter(DOC.getElementById("painter")); var nespainter = new NESPainter(DOC.getElementById("painter"));



+ 1
- 1
index.html View File

<div class="home-menu pure-menu pure-menu-horizontal"> <div class="home-menu pure-menu pure-menu-horizontal">
<a class="pure-menu-heading" href="">Your Site</a> <a class="pure-menu-heading" href="">Your Site</a>
<ul class="pure-menu-list"> <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">Tour</a></li>
<li class="pure-menu-item"><a href="#" class="pure-menu-link">Sign Up</a></li> <li class="pure-menu-item"><a href="#" class="pure-menu-link">Sign Up</a></li>
</ul> </ul>

Loading…
Cancel
Save