Function createElementFromHTML

  • Type Parameters

    • T extends object

    Parameters

    • htmlString: string

      A string to convert into an element.

    • ty: (new () => T)

      The type of the result.

        • new (): T
        • Returns T

    Returns T

    The element that was created.

    An Error if the new element is not of the given type. Or if we couldn't create an element at all.