> I don't know how you'd define non-trivial javascript in a way that couldn't be circumvented.
One approach would be to start out with the interpreter only with extreme throttling. Then to remove the throttling and enable the JIT you'd need explicit permissions.
Audio isn't the only problem though. I'm starting to think that any non-trivial javascript execution should be behind a permission prompt.