mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
fix setup usage example async syntax
This commit is contained in:
committed by
GitHub
parent
74addff3d0
commit
8fbb871a9c
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user