Documentation ¶
Index ¶
- type EventEmitter
- type EventEmitterBase
- func (e *EventEmitterBase) AddListener(ctx context.Context, eventName string, listener *isolates.Value) error
- func (e *EventEmitterBase) AddListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error
- func (e *EventEmitterBase) Emit(ctx context.Context, eventName string, args ...any) error
- func (e *EventEmitterBase) EmitError(ctx context.Context, err error) error
- func (e *EventEmitterBase) EmitErrorValue(ctx context.Context, err *isolates.Value) error
- func (e *EventEmitterBase) EventNames() []string
- func (e *EventEmitterBase) GetMaxListeners() int
- func (e *EventEmitterBase) ListenerCount(ctx context.Context, eventName string, listener *isolates.Value) (int, error)
- func (e *EventEmitterBase) Listeners(eventName string) []*isolates.Value
- func (e *EventEmitterBase) PrependListener(ctx context.Context, eventName string, listener *isolates.Value) error
- func (e *EventEmitterBase) PrependListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error
- func (e *EventEmitterBase) RemoveAllListeners(in isolates.FunctionArgs) error
- func (e *EventEmitterBase) RemoveListener(ctx context.Context, eventName string, listener *isolates.Value) error
- func (e *EventEmitterBase) SetMaxListeners(maxListeners int)
- func (e *EventEmitterBase) V8Construct(in isolates.FunctionArgs) (*EventEmitterBase, error)
- func (e *EventEmitterBase) V8FuncAddListener(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncEmit(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncEventNames(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncGetMaxListeners(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncListenerCount(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncListeners(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncOff(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncOn(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncOnce(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncPrependListener(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncPrependListenerOnce(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncRawListeners(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncRemoveAllListeners(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncRemoveListener(in isolates.FunctionArgs) (*isolates.Value, error)
- func (e *EventEmitterBase) V8FuncSetMaxListeners(in isolates.FunctionArgs) (*isolates.Value, error)
- type EventHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventEmitter ¶
type EventEmitter interface { AddListener(ctx context.Context, eventName string, listener *isolates.Value) error AddListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error Emit(ctx context.Context, eventName string, args ...any) error EmitError(ctx context.Context, err error) error EmitErrorValue(ctx context.Context, err *isolates.Value) error EventNames() []string GetMaxListeners() int SetMaxListeners(maxListeners int) ListenerCount(ctx context.Context, eventName string, listener *isolates.Value) (int, error) Listeners(eventName string) []*isolates.Value RemoveListener(ctx context.Context, eventName string, listener *isolates.Value) error RemoveAllListeners(in isolates.FunctionArgs) error PrependListener(ctx context.Context, eventName string, listener *isolates.Value) error PrependListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error }
type EventEmitterBase ¶
type EventEmitterBase struct {
// contains filtered or unexported fields
}
func NewEventEmitter ¶
func NewEventEmitter(in isolates.FunctionArgs) *EventEmitterBase
func (*EventEmitterBase) AddListener ¶
func (*EventEmitterBase) AddListenerOnce ¶
func (*EventEmitterBase) EmitError ¶
func (e *EventEmitterBase) EmitError(ctx context.Context, err error) error
func (*EventEmitterBase) EmitErrorValue ¶
func (*EventEmitterBase) EventNames ¶
func (e *EventEmitterBase) EventNames() []string
func (*EventEmitterBase) GetMaxListeners ¶
func (e *EventEmitterBase) GetMaxListeners() int
func (*EventEmitterBase) ListenerCount ¶
func (*EventEmitterBase) Listeners ¶
func (e *EventEmitterBase) Listeners(eventName string) []*isolates.Value
func (*EventEmitterBase) PrependListener ¶
func (*EventEmitterBase) PrependListenerOnce ¶
func (*EventEmitterBase) RemoveAllListeners ¶
func (e *EventEmitterBase) RemoveAllListeners(in isolates.FunctionArgs) error
func (*EventEmitterBase) RemoveListener ¶
func (*EventEmitterBase) SetMaxListeners ¶
func (e *EventEmitterBase) SetMaxListeners(maxListeners int)
func (*EventEmitterBase) V8Construct ¶
func (e *EventEmitterBase) V8Construct(in isolates.FunctionArgs) (*EventEmitterBase, error)
func (*EventEmitterBase) V8FuncAddListener ¶
func (e *EventEmitterBase) V8FuncAddListener(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncEmit ¶
func (e *EventEmitterBase) V8FuncEmit(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncEventNames ¶
func (e *EventEmitterBase) V8FuncEventNames(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncGetMaxListeners ¶
func (e *EventEmitterBase) V8FuncGetMaxListeners(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncListenerCount ¶
func (e *EventEmitterBase) V8FuncListenerCount(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncListeners ¶
func (e *EventEmitterBase) V8FuncListeners(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncOff ¶
func (e *EventEmitterBase) V8FuncOff(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncOn ¶
func (e *EventEmitterBase) V8FuncOn(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncOnce ¶
func (e *EventEmitterBase) V8FuncOnce(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncPrependListener ¶
func (e *EventEmitterBase) V8FuncPrependListener(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncPrependListenerOnce ¶
func (e *EventEmitterBase) V8FuncPrependListenerOnce(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncRawListeners ¶
func (e *EventEmitterBase) V8FuncRawListeners(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncRemoveAllListeners ¶
func (e *EventEmitterBase) V8FuncRemoveAllListeners(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncRemoveListener ¶
func (e *EventEmitterBase) V8FuncRemoveListener(in isolates.FunctionArgs) (*isolates.Value, error)
func (*EventEmitterBase) V8FuncSetMaxListeners ¶
func (e *EventEmitterBase) V8FuncSetMaxListeners(in isolates.FunctionArgs) (*isolates.Value, error)
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func (*EventHandler) Add ¶
func (h *EventHandler) Add(callback func(...any) error) func()
func (*EventHandler) Emit ¶
func (h *EventHandler) Emit(args ...any) error
Click to show internal directories.
Click to hide internal directories.