Update std.js

This commit is contained in:
Namhyeon Go 2022-05-10 11:09:34 +09:00 committed by GitHub
parent a2b3383c23
commit cc22c44489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");