Expand description
Provides functions that allow to detect the runtime environment. These functions can be used to detect whether the code is running in a browser, node.js or native OS, the type of the underlying OS (Windows,Linux,MacOS,*BSD) as well as the type of a web environment (Browser or NWJS). This is useful for an application of an API to detect which environment it is operating under and subsequently restrict the functionality to the capabilities to this environment.
Enums§
Functions§
- is_
android - is_
chrome_ extension - is_
cross_ origin_ isolated - Helper to test whether the application is running in a cross-origin isolated browser environment (Flutter).
- is_
electron - Helper to test whether the application is running under Electron.
- is_
electron_ client - Helper to test whether the application is running under Electron backend.
- is_
electron_ server - Helper to test whether the application is running under Electron backend.
- is_
freebsd - is_ios
- is_
linux - is_
macos - is_
mobile - is_
native - Helper to test whether the application is running under native runtime which is not a Solana OS and architecture is not WASM32
- is_
netbsd - is_node
- Helper to test whether the application is running under NodeJs-compatible environment.
- is_nw
- Helper to test whether the application is running under NW environment.
- is_
openbsd - is_
solana - Helper to test whether the application is running under Solana OS.
- is_unix
- is_wasm
- Helper to test (at runtime) whether the application is running under WASM32 architecture.
- is_web
- Helper to test whether the application is running under in a regular browser environment.
- is_
web_ capable - Identifies web-capable environment (browser, NWJS window, Electron client)
- is_
windows - platform