You can add CORS header
Chrome@Win10 v 103 - this MB script works for me with local HTTP server@D1 Mini. The built-in led can be toggled with or by a browser.
Snap! served by http URL http://extensions.snap.berkeley.edu/snap/snap.html
But... without the CORS headers, it works either way for me.
.
It can be updated to use current version of the serial library.