Get screen coordinates of DOM element

前端 未结 3 1642
春和景丽
春和景丽 2020-12-31 09:41

Can I somehow get precise screen coordinates (relative to top left corner of the screen) of a DOM object. Through NPAPI\\FireBreath or JavaScript. (Need this for plugin, tha

3条回答
  •  囚心锁ツ
    2020-12-31 10:20

    you move cursor to somewhere of the page ,and make a click event.(find the window,then GetWindowRect ,caculate a sutable position) then you can catch the event,record clientX and clientY. By this ,you build a bridge between two different coordinate system.

提交回复
热议问题