1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #28457 from luisadame:patch-1

Fix setup usage example async syntax
This commit is contained in:
Alexander Smorkalov
2026-01-25 15:55:22 +03:00
committed by GitHub
@@ -71,7 +71,7 @@ For example, you can create a cv.Mat from an image by cv.imread.
@note Because image loading is asynchronous, you need to put cv.Mat creation inside the `onload` callback.
@code{.js}
imgElement.onload = await function() {
imgElement.onload = async function() {
cv = (cv instanceof Promise) ? await cv : cv;
let mat = cv.imread(imgElement);
}