Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The Utils.js has a utility function for this behavior. It works until a function wrapper or iframe blocks it.

let utils = new Utils('errorMessage');
utils.loadOpenCv(() => {
//code kickoff
})

I had scope issues with modules in a CodePen ecosystem. I organize my code but ES5 and order of execution seem to require some globals in the HEAD. Also asynchronous functions are more manageable with global.

The official tutorials have good examples of file access and function usage. You might also regex batch rename cv.imread cv2::numpy.imread I saw that on a blog.