1
0
mirror of https://github.com/lancedikson/bowser synced 2026-09-22 20:14:20 +00:00

feat: add Ladybird browser support (#627)

This commit is contained in:
Jelle Raaijmakers
2026-07-31 11:10:10 +02:00
committed by GitHub
parent 92b5639733
commit a37b8be8a7
6 changed files with 57 additions and 1 deletions

View File

@@ -3478,6 +3478,22 @@
engine:
name: "WebKit"
version: "537.42"
Ladybird:
-
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Ladybird/1.0 Chrome/146.0.0.0 AppleWebKit/537.36 Safari/537.36"
spec:
browser:
name: "Ladybird"
version: "1.0"
os:
name: "macOS"
version: "10.15.7"
versionName: "Catalina"
platform:
type: "desktop"
vendor: "Apple"
engine:
name: "LibWeb"
SlimerJS:
-
ua: "Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 SlimerJS/0.7"

View File

@@ -75,6 +75,14 @@ test('Parser.getEngineName gives a lower-cased name of the engine', (t) => {
t.is(parser.getEngineName(true), 'blink');
});
test('Parser prioritizes browser-specific engines over generic UA tokens', (t) => {
const ladybirdUA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Ladybird/1.0 Gecko/20100101 Chrome/146.0.0.0 AppleWebKit/537.36 Safari/537.36';
const ladybirdParser = new Parser(ladybirdUA);
t.is(ladybirdParser.getBrowserName(), 'Ladybird');
t.is(ladybirdParser.getEngineName(), 'LibWeb');
});
test('Skip parsing shouldn\'t parse', (t) => {
t.deepEqual((new Parser(UA, true)).getResult(), {});
});