Just to put to rest any doubt that Google knows javascript well...
An image gallery I launched has very little text until people comment on the pages. The adsense unit up top has more text than the entire rest of the page until I get those comments. Google previews highlight the text from the adsense units as being representative of the page text, and the ads are of course javascript via 3rd party domain.
Google knows javascript and can read/parse it just fine.