How to get Figma plugin UI real time position?

Hi guys, I want to get the figma plugin ui real time position to work with figma.ui.reposition() api, but I don’t know how to get the figma plugin ui real time position.So I would like to ask you if there is any way to solve this problem.