当前位置:网站首页>How to determine whether the current script is in the node environment or the browser environment?
How to determine whether the current script is in the node environment or the browser environment?
2022-07-02 00:51:00 【Vegetable seller Xiaobai】
Determine the environment of the current script , Can be judged Global Whether the object is window, If yes, it indicates that the current environment is a browser environment , If not, it means that the current environment is node Environmental Science .
this === window ? "browser" : "node"
边栏推荐
- [CTF] bjdctf 2020 Bar _ Bacystack2
- Heketi record
- Schrodinger's Japanese learning applet source code
- Upgraded wechat tool applet source code for mobile phone detection - supports a variety of main traffic modes
- Node -- egg implements the interface of uploading files
- When installing mysql, there are two packages: Perl (data:: dumper) and Perl (JSON)
- Accelerator systems initiative is an independent non-profit organization
- EMC circuit protection device for surge and impulse current protection
- Summary of Aix storage management
- 【底部弹出-选择器】uniapp Picker组件——底部弹起的滚动选择器
猜你喜欢

【八大排序③】快速排序(动图演绎Hoare法、挖坑法、前后指针法)

Viewing and modifying volume group attributes of Aix storage management (II)

ThreadLocal内存泄漏是什么,怎么解决
![[eight sorts ②] select sort (select sort, heap sort)](/img/4b/da0d08230391d6ee48cd8cfd2f7240.png)
[eight sorts ②] select sort (select sort, heap sort)

Guide d'installation du serveur SQL

How to improve data quality

Practical calculation of the whole process of operational amplifier hysteresis comparator

How to extract login cookies when JMeter performs interface testing

【底部弹出-选择器】uniapp Picker组件——底部弹起的滚动选择器

B tree and b+tree of MySQL
随机推荐
BiLSTM-CRF代码实现
What skills does an excellent software tester need to master?
Geek DIY open source solution sharing - digital amplitude frequency equalization power amplifier design (practical embedded electronic design works, comprehensive practice of software and hardware)
Slf4j print abnormal stack information
Is the securities account given by qiniu business school safe? Where can I open an account
Intelligent operation and maintenance practice: banking business process and single transaction tracking
Cmake engineering related
Excel search and reference function
B tree and b+tree of MySQL
How to improve data quality
Source code of Qiwei automatic card issuing system
S32Kxxx bootloader之UDS bootloader
Window sorting functions rank and deny for SQL data analysis_ rank、raw_ Number and lag, lead window offset function [usage sorting]
[conference resources] the Third International Conference on Automation Science and Engineering in 2022 (jcase 2022)
Leetcode skimming: binary tree 03 (post order traversal of binary tree)
Practical calculation of the whole process of operational amplifier hysteresis comparator
【八大排序①】插入排序(直接插入排序、希尔排序)
Guide d'installation du serveur SQL
You probably haven't noticed the very important testing strategy in your work
Comprehensive usage and case questions of sub query of SQL data analysis [patient sorting]