Home > SYS_Environment > isWeb
SYS_Environment.isWeb() method
Whether it is in the browser environment
Signature
typescript
function isWeb(): boolean;1
Returns
boolean
Whether it is in the browser environment
Example
javascript
// 1. 判断当前是否为浏览器环境(同步返回布尔值)
const isWeb = eda.sys_Environment.isWeb();
// 2. 输出判断结果(网页版为 true,桌面客户端为 false)
console.log('是否浏览器环境:', isWeb);1
2
3
4
5
2
3
4
5