mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
parent
a81b8c0ed7
commit
3fdde501d4
16
README.md
16
README.md
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user