mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-11 16:35:13 +00:00
Fix StdEventTarget object
This commit is contained in:
parent
d17138a980
commit
b83e2671f9
|
@ -363,7 +363,7 @@ function StdEventTarget() {
|
|||
};
|
||||
|
||||
this.addEventListener = function(type, listener) {
|
||||
if (typeof f === "function") {
|
||||
if (typeof listener === "function") {
|
||||
this.__events__.push({
|
||||
"type": type,
|
||||
"listener": listener,
|
||||
|
@ -376,7 +376,7 @@ function StdEventTarget() {
|
|||
};
|
||||
|
||||
this.removeEventListener = function(type, listener) {
|
||||
if (typeof f === "function") {
|
||||
if (typeof listener === "function") {
|
||||
for (var i = 0; i < this.__events__.length; i++) {
|
||||
var e = this.__events__[i];
|
||||
if (e.type == event.type && typeof(e.listener) === "function" && e.listener.toString() == listener.toString()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user