• Determines whether the provided element is an instance of SVGElement.

    This function checks if the provided element is not nullish (null or undefined) and if it is an instance of the SVGElement class. It is used to validate if the element can be manipulated as an SVG element in the DOM.

    Parameters

    • element: unknown

      The element to be checked.

    Returns boolean

    true if the element is an SVGElement instance, otherwise false.

    Example

    // Returns: true
    ix.api.is.isSVGElement(document.getElementById('mySvgElement'));

    // Returns: false
    ix.api.is.isSVGElement("not-an-element");