Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330808 - [Browser] support ProgressListener
Summary: [Browser] support ProgressListener
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4 M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 330806
  Show dependency tree
 
Reported: 2010-11-22 10:07 EST by Tim Buschtoens CLA
Modified: 2010-11-25 04:42 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2010-11-22 10:07:15 EST
Progress-listner is essential for using execute and evaluate methods, because they will fail if the URL has been set, but not yet loaded.

Example:
Browser browser = new Browser(parent, SWT.NONE );
browser.setURL( "some URL" );
browser.execute( "some js" );

This won't work. It has to be:

Browser browser = new Browser(parent, SWT.NONE );
browser.setURL( "some URL" );
browser.addProgressListener( new ProgressListener() {
  public void completed(ProgressEvent event) {
    browser.execute( "some js" );
  }          
  public void changed(ProgressEvent event) {
  }
} );
Comment 1 Ivan Furnadjiev CLA 2010-11-25 04:42:26 EST
Changes are in CVS HEAD.