浏览代码

Added tests for EvenWindow's emit attribute ability.

dev-tmpl
Bryan Miller 6 年前
父节点
当前提交
7eb56e2374
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. +6
    -0
      app/js/main.js
  2. +1
    -1
      index.html

+ 6
- 0
app/js/main.js 查看文件

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 查看文件

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

正在加载...
取消
保存