tryImageElementFromUrl Function

Try to create an html Image element from a URL.

tryImageElementFromUrl(url: string): Promise<HTMLImageElement | undefined>

see imageElementFromUrl

Parameter Type Description
url string The URL pointing to the image data.

Returns - Promise<HTMLImageElement | undefined>

A Promise resolving to an HTMLImageElement when the image data has been loaded from the URL, or to undefined if an exception occurred.

Defined in

Last Updated: 12 June, 2024