mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +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) {
|
||||
if (typeof(fn) == "function") {
|
||||
if (typeof fn === "function") {
|
||||
this['on' + eventName] = fn;
|
||||
} else {
|
||||
throw new TypeError("EventListener must be a function");
|
||||
|
|
Loading…
Reference in New Issue
Block a user