Chain withClientHints
and withFeatureCheck
?
#789
Unanswered
gavrilikhin-d
asked this question in
Q&A
Replies: 3 comments
-
Hi, thanks for reporting the issue, this should be made possible, I'll add this to my pipeline |
Beta Was this translation helpful? Give feedback.
0 replies
-
It's actually possible, though not so trivial: const parser = new UAParser()
const result = parser.getResult()
const resultCH = await result.withClientHints()
const resultFull =
// Apparently resultCH can't be chained if browser does not support CH
await (
typeof resultCH.withFeatureCheck === "function" ? resultCH : result
).withFeatureCheck() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ideally it should be just |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Looks like it's not possible to use both
Beta Was this translation helpful? Give feedback.
All reactions