Document.scaleSelection()?

Trying to find out how this works. Want to use this on an object that I need to flip horisontally. But I cant get it to work. Can anybody please help me get started with this? Thank you.