Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser Widget, no mouse events while loading(Mouse Events don't seem to fire while browser is loading a page)
SWT Browser Widget, no mouse events while loading [message #525597] Wed, 07 April 2010 06:20 Go to next message
Demus  is currently offline Demus Friend
Messages: 1
Registered: April 2010
Junior Member
I'm trying to capture user clicks on a webpage in de SWT Browser widget. However, the mouse handler is only called when the page has finished loading. Since we're surfing on some pretty slow sites with lots of images, users will almost never wait for the whole page to finish loading before clicking on a link.

I thought about injecting some javascript in the DOM of the page to track user clicks, but that doesn't seem possible either when the page hasn't finished loading: how will I know the DOM is ready when all I get is a progress percentage?

Does any of you know a way to capture user clicks while the page is still loading or how to find out if the DOM of the page has finished loading?

I'm using the Mac OS X swt with the Safari browser.

Kind regards,
Demus
Re: SWT Browser Widget, no mouse events while loading [message #526079 is a reply to message #525597] Thu, 08 April 2010 15:49 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Demus,

I've just fixed this in the eclipse 3.6 stream, the associated bug report is
https://bugs.eclipse.org/bugs/show_bug.cgi?id=308500 .

In the meantime, you should be able to add your DOM listeners when you
receive a ProgressEvent.changed() callback, as this is the point at which
the Browser is now adding its listeners in the eclipse 3.6 stream.

HTH,
Grant


"Demus" <nico@sugarcode.be> wrote in message
news:hph86m$k1r$1@build.eclipse.org...
> I'm trying to capture user clicks on a webpage in de SWT Browser widget.
However, the mouse handler is only called when the page has finished
loading. Since we're surfing on some pretty slow sites with lots of images,
users will almost never wait for the whole page to finish loading before
clicking on a link.
>
> I thought about injecting some javascript in the DOM of the page to track
user clicks, but that doesn't seem possible either when the page hasn't
finished loading: how will I know the DOM is ready when all I get is a
progress percentage?
>
> Does any of you know a way to capture user clicks while the page is still
loading or how to find out if the DOM of the page has finished loading?
>
> I'm using the Mac OS X swt with the Safari browser.
>
> Kind regards,
> Demus
Previous Topic:SWT.PASSWORD default echo char
Next Topic:Single Selection of the cell in Tree component
Goto Forum:
  


Current Time: Mon Dec 02 23:34:04 GMT 2024

Powered by FUDForum. Page generated in 0.02894 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top