Is there any advantage to adding salt to onion while frying?
It is true, in my experience. However, if your recipe does not require salt, you should not be adding it, of course. Removing moisture from onion with the aid of salt helps it reach its desired state (brown or translucent, as desired) faster.

I am most familiar with the use of onion in Indian cooking. I generally add a pinch or two of salt to onion when I start sauteing it. Onion starts sweating as soon as you add salt and start stirring. 

The reason that salt draws out moisture from onion is osmotic pressure. The surface of the onion acts as a semipermeable membrane barrier. Since the solution outside the onion is more concentrated with respect to salt, water moves out of the onion to the general liquid side, to balance the osmotic pressure on either side of the onion surface.