mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-12 20:51:03 +00:00
Update std.js
This commit is contained in:
parent
a2b3383c23
commit
cc22c44489
|
@ -328,7 +328,7 @@ function StdEventableObject() {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.addEventListener = function(eventName, fn) {
|
this.addEventListener = function(eventName, fn) {
|
||||||
if (typeof(fn) == "function") {
|
if (typeof fn === "function") {
|
||||||
this['on' + eventName] = fn;
|
this['on' + eventName] = fn;
|
||||||
} else {
|
} else {
|
||||||
throw new TypeError("EventListener must be a function");
|
throw new TypeError("EventListener must be a function");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user