@taopao, And for a component to be "trusted" it has to be code that was loaded with the operating system, or in this case, the operating environment (the browser)?
It seems to me that quashing tampering or observing of the trusted component is the lynchpin. In JavaScript, there is no way to access unexposed internals of an IIFE, that seems to me to get us half way there.
I wonder if there could be some way to add a "use trusted" pragma to an IIFE such that the browser would not allow debugging or watching the network traffic of that code? There'd have to be some new way to compare a checksum of the trusted code as well. I suppose that that could suffice in a video watermarking scenario, but Netflix could never watermark each and every video transmitted. I think they partner with some ISP's to cache content near to the users as well, so they're not even responsible for broadcasting the last mile of the video.