Skip to content

Commit

Permalink
* [html5] fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRaindrop committed Sep 1, 2016
1 parent acbc252 commit 43b24da
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions html5/browser/extend/api/globalEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ const globalEvent = {
* @param {string} evt - the event name to add a listener on.
*/
addEventListener (evt, callbackId) {
// const cb = e => this.sender.performCallback(callbackId, e)
const cb = function (e) {
debugger;
this.sender.performCallback(callbackId, e)
}.bind(this)
const cb = e => this.sender.performCallback(callbackId, e)
if (!handlerTraker[evt]) {
handlerTraker[evt] = [cb]
} else {
}
else {
handlerTraker.push(cb)
}
document.addEventListener(evt, cb)
Expand Down

0 comments on commit 43b24da

Please sign in to comment.