Skip to content

getEngine(): IEngine

Get layout rendering engine name & version from user-agent string.

Properties of IEngine:

js
// Engine object is structured as follow:
{ 
    name: "", 
    version: ""
}

name?: string

INFO

See list of possible engine name here.


version?: string

Determined dynamically.

Methods of IEngine

Inherited from IData:

Code Example

js
const operamini = 'Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/19.916; U; en) Presto/2.5.25'
const parser = new UAParser(operamini);

console.log(parser.getEngine());
// { name : "Presto", version : "2.5.25" }

UAParser.js v2 is licensed under AGPLv3 or PRO licenses.