Bug 293736

Summary: [Browser] Add Browser.getBrowserVersion()
Product: [Eclipse Project] Platform Reporter: Christopher Deckers <chrriis>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
A Javascript based approach. none

Description Christopher Deckers CLA 2009-10-29 17:02:00 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 XPCOMViewer/0.9a
Build Identifier: SWT 3.6

In the Browser class, there is:
String getBrowserType();

There should also be:
String getBrowserVersion();

This would greatly help with debugging when something does not work, as well as tweaking certain page injections using both type and version.

Reproducible: Always
Comment 1 Christopher Deckers CLA 2009-10-29 17:07:53 EDT
Created attachment 150877 [details]
A Javascript based approach.

I implemented a Javascript based approach (a conversion of a pure JS version, so some browsers are not applicable in the SWT world).

With this, the method I am asking for would look like this:
String getBrowserVersion() {
  return new JSBrowserDetection(this).browserVersion;
}

Of course, there might be ways to query that info with more accuracy using native browser APIs.

Note that certain browsers have different versions between the browser itself and the engine it uses (like Safari). In this case, the version of the engine is probably more interesting.
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:06:37 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.