Consider a cryptographic web application that relies on hosted JavaScript. This JavaScript could be manipulated server-side by a bad actor, defeating any cryptographic tasks. Namely:
private keys could be sent back to the server
cleartext could be sent back to the server
The Web Cryptography API addresses some of these concerns by providing cryptographic primitives without exposing keys, addressing item 1.
It looks to me like bad JavaScript could still transmit cleartext back to the server. Am I missing something, or is this issue not addressed by Web Crypto?