Skip to content

Commit

Permalink
Add navigator.maxTouchPoints
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Oct 15, 2023
1 parent 46f46a9 commit 2ef1bf8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gold-hairs-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nxjs-runtime': patch
---

Add `navigator.maxTouchPoints`
13 changes: 12 additions & 1 deletion packages/runtime/src/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,20 @@ export class Navigator {
* @example "my-app/0.0.1 (Switch; en-us; rv:14.1.2|AMS 1.5.4|E) nx.js/0.0.18"
* @see https://developer.mozilla.org/docs/Web/API/Navigator/userAgent
*/
get userAgent(): string {
get userAgent() {
return `nx.js/${Switch.version.nxjs}`;
}

/**
* Returns the maximum number of simultaneous touch contact points are
* supported by the current device.
*
* @example 10
* @see https://developer.mozilla.org/docs/Web/API/Navigator/maxTouchPoints
*/
get maxTouchPoints() {
return 10;
}
}
def('Navigator', Navigator);

Expand Down

0 comments on commit 2ef1bf8

Please sign in to comment.