From Matt Cutts, head of Google's webspam team: "Is excessive whitespace in the HTML source bad?"
Source: http://www.youtube.com/watch?v=u55Rn1mYgO8&feature=player_embedded
We really don’t care that much. We’re pretty good, you know, anytime we see white space, we’ll separate stuff, and we can ignore white space. So it really doesn’t cause us a lot of harm either way. The only thing to really pay attention to is I have seen some sneaky people who will try to do hidden text or whatever and they’ll start off their HTML with like 60 new lines. Right? So whenever you view source code you’re like, "Oh man, it’s blank, there is no source. Whoa, dude, you just blew my mind!" And anybody who is savvy is like, "or I can use the scroll bar, and see what's down here." So, you know, I would just use whatever white space is reasonable for you. [...] And Google does a very good job about, you know, finding separators and breaking it. So, um, don't, you know, make one word for every 200 blank lines. But otherwise, you know, as long as you're doing normal reasonable stuff I wouldn't worry about it that much.
Search spiders will simply ignore any extra whitespace (just like your web browser will). So to answer your question about white space and SEO, no, it won't negatively affect your SEO. His only caution seems to be against including hundreds of blank lines in your source code, though I'm not sure why even that would matter.
But as Stepan Riha mentioned, search spiders don't have javascript enabled anyway, so this would only matter if you were pre-rendering it before passing it to the browser.