Skip to content

Commit

Permalink
Add navigator.platform
Browse files Browse the repository at this point in the history
This is needed for compat with the `xterm-headless` npm module.
  • Loading branch information
TooTallNate committed Nov 9, 2023
1 parent a197c84 commit 79b5f00
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-berries-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nxjs-runtime': patch
---

Add `navigator.platform`
10 changes: 10 additions & 0 deletions packages/runtime/src/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ export class Navigator {
assertInternalConstructor(arguments);
}

/**
* Identifies the platform on which the application is running.
*
* @example "Horizon arm64"
* @see https://developer.mozilla.org/docs/Web/API/Navigator/platform
*/
get platform() {
return 'Horizon arm64';
}

/**
* The value used for the `User-Agent` request header for
* HTTP requests initiated with {@link fetch | `fetch()`}.
Expand Down

0 comments on commit 79b5f00

Please sign in to comment.