imageElementFromUrl Function

Create an html Image element from a URL.

imageElementFromUrl(url: string, skipCrossOriginCheck: boolean = false): Promise<HTMLImageElement>

see tryImageElementFromUrl.

extensions

Parameter Type Description
url string The URL pointing to the image data.
skipCrossOriginCheck boolean Set this to true to allow an image from a different origin than the web app to load. Default is false.

Returns - Promise<HTMLImageElement>

A Promise resolving to an HTMLImageElement when the image data has been loaded from the URL.

Defined in

Last Updated: 30 November, 2023