That's the thing about Javascript. The tiniest little XSS or subtle origin violation results in the entire browser app being 100% 'pwned' (to use the technical term).
The pwnage can even persist into the future for that user when you consider the ability of browsers to cache content and HTML5's data store.