how to get the coordinates of Browser?

675 Views Asked by At

I have created Firefox extension using XPCOM . I want to get coordinates of client area of browser? How to get coordinates of client area of browser using XPCOM? please help me. thanks, Nandkuamar

1

There are 1 best solutions below

0
On
  1. If you have a window variable for the content area in question, just use its screenX/screenY properties.
  2. If you have a window variable for the browser in question, use its content property to access the current tab's window, and then follow step 1.
  3. If you don't have a variable yet, you can ask the window mediator for one.