Skip to content

Commit

Permalink
fix: add platform to navigator
Browse files Browse the repository at this point in the history
  • Loading branch information
herefishyfish committed Nov 22, 2024
1 parent ab0278e commit 80f0b4d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/canvas-polyfill/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ export class Navigator {
userAgent = 'NativeScript';
vendor = '';
vendorSub = '';
platform = [];
appVersion = Device.osVersion;
maxTouchPoints = 5;
standalone = true;
get gpu() {
return gpu;
}
get platform() {
if (global.isIOS) {
if (Device.os === 'iPadOS') {
return 'MacIntel';
}
return Device.deviceType === 'Tablet' ? 'iPad' : 'iPhone';
}
return Device.os;
}
}

0 comments on commit 80f0b4d

Please sign in to comment.