0

Say I have a div element which is not located at the top of the webpage, ie, one needs to scroll down in order to view it (Of course, this also depends on the page resolution of the user).

What I need to find out is whether the user sees that div element or not.

Thus basically my question may be put thus,

Is it possible to be dynamically aware of the portion of the webpage being viewed using an extension. If so, how?

PS: I am using GWT for building the app.

Saurabh Agarwal
  • 497
  • 5
  • 16

1 Answers1

1

The same as you would do from simple javascript: LINK

The only difference is, that the object window means something different (on extension its literally a window). You can get the window object with document.defaultView.

Community
  • 1
  • 1
Máthé Endre-Botond
  • 4,338
  • 1
  • 25
  • 44