:memo: 前端笔记
Home Page:https://zh-rocco.github.io/
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
zh-rocco opened this issue 6 years ago · comments
返回其所包含的脚本中正在被执行的 <script> 元素
<script>
值得注意的是,如果当前正在执行的代码是处在某个回调函数或者事件处理函数中的,那么 currentScript 属性不会指向包含那个函数的 <script> 元素,而是会返回 null。
currentScript
null
相关: current-script-polyfill