Skip to content

Commit

Permalink
Refine explanation of matching on navigator.platform value
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Mar 31, 2022
1 parent 5d2d85b commit e0e202c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/navigator/platform/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (navigator.platform.indexOf("Mac") === 0 || navigator.platform === "iPhone")
}
```

That is, check `navigator.platform` for a match on the substring `"Mac"`, or an exact match for the string `"iPhone"`, and then based on whether or not there’s a match, choose the modifier key that your web application’s UI will advise users to press in keyboard shortcuts.
That is, check if `navigator.platform` starts with `"Mac"` or else is an exact match for `"iPhone"`, and then based on whether either of those is true, choose the modifier key your web application’s UI will advise users to press in keyboard shortcuts.

## Usage notes

Expand Down

0 comments on commit e0e202c

Please sign in to comment.