Function svg

  • Fetches the file at the specified input URL as text, parses it as SVG and returns a Promise of an SVG Document.

    If init is specified, it is passed along to the underlying call to fetch.

    Parameters

    • url: string

      A valid URL string.

    • Optional init: RequestInit

      An optional request initialization object.

    Returns Promise<Document>