mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 16:23:25 +00:00
Updated event emitter, so that 'on', 'once', etc, return the emitter, so they can be chained together
This commit is contained in:
@@ -391,7 +391,8 @@ duk_ret_t ILibDuktape_EventEmitter_on(duk_context *ctx)
|
|||||||
((int*)ILibLinkedList_GetExtendedMemory(node))[0] = once;
|
((int*)ILibLinkedList_GetExtendedMemory(node))[0] = once;
|
||||||
data->totalListeners[0]++;
|
data->totalListeners[0]++;
|
||||||
|
|
||||||
return 0;
|
duk_push_this(ctx);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
ILibDuktape_EventEmitter* ILibDuktape_EventEmitter_GetEmitter_fromThis(duk_context *ctx)
|
ILibDuktape_EventEmitter* ILibDuktape_EventEmitter_GetEmitter_fromThis(duk_context *ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user