discore/closest — pull request #3 by treygriffith (2013-11-23 04:03:09+00:00)
Title: refactor into a `while`

I looked at your comment from the previous PR and realized that since you're already doing the `element = element.parentNode` assignment and null check, a `while` is more succinct than a `do...while`.

It doesn't change any functionality, and the tests still pass.