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

@@ -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"));


+ 1
- 1
index.html View File

@@ -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>

Loading…
Cancel
Save