You may be interested in this Chromium fork that Intel is working on which adds a machine learning API, loosely modeled on Android's NNAPI: https://github.com/otcshare/chromium-src/commits/webml
It's not likely to be standardized as is, but the code demonstrates how to integrate something like this into Chromium. There's a Web ML community group that's working to figure out what could be standardized in this area. https://webmachinelearning.github.io/
Anecdotally, I was trying connect PyTorch's CUDA tensors to the GL textures that Electron/Chrome uses to render in a Canvas without going through CPU memory, but couldn't figure out where to inject my code. Chromium's GPU code is quite a maze. Perhaps a smarter person will be able to accomplish that.