1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Clarify use case in doc

close #300
This commit is contained in:
Nicolas Girault 2019-03-05 22:06:02 +01:00 committed by GitHub
parent a81b8c0ed7
commit 3fdde501d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,20 +53,20 @@ console.log(`The current browser name is "${browser.getBrowserName()}"`);
or
```javascript
const impression = new Impression();
const browser = Bowser.getParser(window.navigator.userAgent);
const browserInfo = browser.getBrowser();
impression.brName = browserInfo.name;
impression.brVer = browserInfo.version;
console.log(browser.getBrowser());
// outputs
{
name: "Internet Explorer"
version: "11.0"
}
```
or
```javascript
const browser = Bowser.getParser(window.navigator.userAgent);
impression.userTechData = browser.parse();
console.log(impression.userTechData);
console.log(Bowser.parse(window.navigator.userAgent));
// outputs
{