mirror of
https://github.com/titaniumnetwork-dev/Ultraviolet.git
synced 2025-05-16 13:00:01 -04:00
23 lines
No EOL
531 B
JavaScript
23 lines
No EOL
531 B
JavaScript
class HookEvent {
|
|
#intercepted;
|
|
#returnValue;
|
|
constructor(data = {}, target = null, that = null) {
|
|
this.#intercepted = false;
|
|
this.#returnValue = null;
|
|
this.data = data;
|
|
this.target = target;
|
|
this.that = that;
|
|
};
|
|
get intercepted() {
|
|
return this.#intercepted;
|
|
};
|
|
get returnValue() {
|
|
return this.#returnValue;
|
|
};
|
|
respondWith(input) {
|
|
this.#returnValue = input;
|
|
this.#intercepted = true;
|
|
};
|
|
};
|
|
|
|
export default HookEvent; |