Using window.getSelection to get a string
<p>I'm trying to use <code>window.getSelection</code> to get a string but it's returning an object.</p>

<pre><code>var text = '';
text = document.getSelection();
alert(typeof(text)); //object
</code></pre>
