No, that's the completely wrong way to do it. Download the code onto a computer. Ask the candidate to add a feature.
Or, do a screen share.
The moment I'm asked to write code on a whiteboard, I politely ask to use a computer. If they can't accommodate (I bring my own laptop just in case), the interview ends.