runtime.PlatformInfo

An object containing information about the current platform.

Type

Values of this type are objects, which contain the following properties:

os

runtime.PlatformOs. The platform's operating system.

arch

runtime.PlatformArch. The platform's processor architecture.

nacl_arch

runtime.PlatformNaclArch. The Google Native Client architecture. Only Chromium-based browsers support this attribute, and Chromium is removing it. Consider migrating to arch, which contains equivalent information and is more descriptive on some platforms (ARM and RISC-V).

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
PlatformInfo
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
nacl_arch
Chrome – Full support
Chrome 28 (Release date: 2013-07-09)
footnote
footnote This attribute is deprecated and is being removed from Google Chrome, following removal of Google Native Client.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote This attribute is deprecated and is being removed from Edge, following removal of Google Native Client.
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote
footnote This attribute is deprecated and is being removed from Opera, following removal of Google Native Client.
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

Note: This API is based on Chromium's chrome.runtime API. This documentation is derived from runtime.json in the Chromium code.