mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 15:59:47 +00:00
[TS] Use strict mode in LGraphCanvas (#654)
- Prefer creating HTML elements in JS and `append()` over innerHTML & `querySelector()` - Removes redundant code - Adds/fixes TS types
This commit is contained in:
@@ -28,7 +28,7 @@ export class ContextMenu<TValue = unknown> {
|
||||
* - ignore_item_callbacks: ignores the callback inside the item, it just calls the options.callback
|
||||
* - event: you can pass a MouseEvent, this way the ContextMenu appears in that position
|
||||
*/
|
||||
constructor(values: (string | IContextMenuValue<TValue> | null)[], options: IContextMenuOptions<TValue>) {
|
||||
constructor(values: readonly (string | IContextMenuValue<TValue> | null)[], options: IContextMenuOptions<TValue>) {
|
||||
options ||= {}
|
||||
this.options = options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user