You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since fcts is on the prototype, and an object, it's shared by all instances of the same emitter class.
function Foo () {}
MicroEvent.mixin(Foo)
f = new Foo
b = new Foo
f.bind("blerg", function () { console.log("f got blerg") })
b.trigger("blerg")
Instead of putting fcts on the prototype, you must check for it on the object at the start of the bind/trigger/unbind functions and default it to {} if it's not set or not an object.
The text was updated successfully, but these errors were encountered:
Since fcts is on the prototype, and an object, it's shared by all instances
of the same emitter class.
function Foo () {}
MicroEvent.mixin(Foo)
f = new Foo
b = new Foo
f.bind("blerg", function () { console.log("f got blerg") })
b.trigger("blerg")
Instead of putting fcts on the prototype, you must check for it on the
object at the start of the bind/trigger/unbind functions and default it to {} if it's not set or not an object.
Reply to this email directly or view it on GitHub: #1
Since fcts is on the prototype, and an object, it's shared by all instances
of the same emitter class.
function Foo () {}
MicroEvent.mixin(Foo)
f = new Foo
b = new Foo
f.bind("blerg", function () { console.log("f got blerg") })
b.trigger("blerg")
Instead of putting fcts on the prototype, you must check for it on the
object at the start of the bind/trigger/unbind functions and default it to {} if it's not set or not an object.
Reply to this email directly or view it on GitHub: #1
Reply to this email directly or view it on GitHub: #1 (comment)
Since fcts is on the prototype, and an object, it's shared by all instances of the same emitter class.
Instead of putting fcts on the prototype, you must check for it on the object at the start of the bind/trigger/unbind functions and default it to
{}
if it's not set or not an object.The text was updated successfully, but these errors were encountered: