Ok I'm trying to make a script where you can select something on the page, press a copy image on the page, and the script adds the data to the clipboard. I know that you can add data to the clipboard like this:

window.clipboardData.setData("Text","Data to copy");

But how can I find out what the user has selected? I know there's got to be some way to do it..but I can't figure out how.