WEBCAT allows developers to sign their web applications, site operators to enroll their domains, and web browsers to transparently verify the resources they receive.
It uses established technologies and is open source: https://github.com/freedomofpress/webcat