OpenCV: Using OpenCV.js
In this tutorial, you will learn how to include and start to use opencv.js inside a web page. You can get a copy of opencv.js from opencv-{VERSION_NUMBER}-docs.zip in each release, or simply download the prebuilt script from the online documentations at "https://docs.opencv.org/{VERSION_NUMBER}/opencv.js" (For example, https://docs.opencv.org/3.4.0/opencv.js. Use master if you want the latest build).
https://docs.opencv.org/3.4/d0/d84/tutorial_js_usage.html