getEngine(): IEngine
Get layout rendering engine name & version from user-agent string.
js
// Result object is structured as follow:
{ name: '', version: '' }
Properties of IEngine
:
name?: string
version?: string
Determined dynamically
Methods inherited from IData
:
is(value: string): boolean
toString(): string
withClientHints<IEngine>(): PromiseLike<IEngine> | IEngine
withFeatureCheck<IEngine>(): PromiseLike<IEngine> | IEngine
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" }