mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
Implemented Coding Contracts
This commit is contained in:
@@ -35,6 +35,7 @@ interface ICreateElementListenerOptions {
|
||||
clickListener?(this: HTMLElement, ev: MouseEvent): any;
|
||||
inputListener?(this: HTMLElement, ev: Event): any;
|
||||
onfocus?(this: HTMLElement, ev: FocusEvent): any;
|
||||
onkeydown?(this: HTMLElement, ev: KeyboardEvent): any;
|
||||
onkeyup?(this: HTMLElement, ev: KeyboardEvent): any;
|
||||
}
|
||||
|
||||
@@ -148,6 +149,9 @@ function setElementListeners(el: HTMLElement, params: ICreateElementListenerOpti
|
||||
if (params.onkeyup !== undefined) {
|
||||
el.addEventListener("keyup", params.onkeyup);
|
||||
}
|
||||
if (params.onkeydown !== undefined) {
|
||||
el.addEventListener("keydown", params.onkeydown);
|
||||
}
|
||||
if (params.onfocus !== undefined) {
|
||||
el.addEventListener("focus", params.onfocus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user