• Sets the style properties of the specified target to the specified styles object with key of style property name and value of the corresponding property value.

    Type Parameters

    Parameters

    • target: null | Target

      Element, EventTarget, or CSS selector.

    • styles: Partial

      Object with style property values keyed by name.

    Returns E

    Element representation of the specified target.

    elements!InvalidElementError if the target could not be found or doesn't have a style property.