• Assigns a specified value to an attribute on the given HTML element.

    Parameters

    • element: HTMLElement

      The HTML element on which the attribute will be set.

    • attributeName: string

      The name of the attribute to be set.

    • attributeValue: string

      The value to assign to the specified attribute.

    Returns void

    See

    MDN Documentation for Element.setAttribute()

    Example

    // Get an input element by its GUID
    const element = ix.api.dom.getHtml("<ELEMENT-GUID>");

    // Set the 'type' attribute of the input element to 'button'
    ix.api.dom.setAttribute(element, "type", "button");