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

Merge pull request #301 from nicgirault/patch-1

Clarify use case in doc
This commit is contained in:
Denis Demchenko 2019-03-06 14:20:48 +02:00 committed by GitHub
commit 5873e24c76
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 or
```javascript ```javascript
const impression = new Impression();
const browser = Bowser.getParser(window.navigator.userAgent); const browser = Bowser.getParser(window.navigator.userAgent);
const browserInfo = browser.getBrowser(); console.log(browser.getBrowser());
impression.brName = browserInfo.name;
impression.brVer = browserInfo.version; // outputs
{
name: "Internet Explorer"
version: "11.0"
}
``` ```
or or
```javascript ```javascript
const browser = Bowser.getParser(window.navigator.userAgent); console.log(Bowser.parse(window.navigator.userAgent));
impression.userTechData = browser.parse();
console.log(impression.userTechData);
// outputs // outputs
{ {