Self signed HTTPS works for this case as long as you know the fingerprint/cert to accept.
So you would need to ship a crypto library in JS, hehe :)
Self-signed certs probably does work, if you install the certificate root on your machine. It just not something you would advice end-users to do.