ixfx
    Preparing search index...

    Function buttonCreate

    • Creates a BUTTON element, wrapping it via button and returning it.

      const b = buttonCreate(`Stop`, () => console.log(`Stop`));
      someParent.addNode(b.el);

      Parameters

      • title: string
      • OptionalonClick: () => void

      Returns {
          disabled: boolean;
          el: HTMLButtonElement;
          get title(): string | null;
          set title(value: string): void;
          click(): void;
          dispose(deleteElement?: boolean): void;
          onClick(handler?: () => void): void;
      }

      • disabled: boolean

        Sets disabled state of button

      • Readonlyel: HTMLButtonElement

        Gets the button element

      • get title(): string | null

        Gets text content of button

      • set title(value: string): void

        Sets text content of button

      • click: function
        • Trigger onClick handler

          Returns void

      • dispose: function
        • Disposes the button. Removes event handler and optionally removes from document

          Parameters

          • OptionaldeleteElement: boolean

          Returns void

      • onClick: function
        • Sets the click handler, overwriting existing.

          Parameters

          • Optionalhandler: () => void

          Returns void