---
title: Element:beforescriptexecute 事件
slug: Web/Events/beforescriptexecute
tags:
  - DOM
  - 参考
  - 非标准
translation_of: Web/API/Element/beforescriptexecute_event
---
<div>{{APIRef}}</div>

<div>{{Non-standard_header}}</div>

<div class="warning">
<p>此事件是早期版本的规范中的一个提案。不要依赖它。</p>
</div>

<p><strong><code>beforescriptexecute</code></strong> 事件在一个脚本被执行前触发,取消此事件可以阻止该脚本的执行。</p>

<p>这是一个 Gecko(Firefox)特有的私有事件。</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">是否冒泡</th>
   <td>是</td>
  </tr>
  <tr>
   <th scope="row">是否可取消</th>
   <td>是</td>
  </tr>
  <tr>
   <th scope="row">接口</th>
   <td>{{domxref("Event")}}</td>
  </tr>
  <tr>
   <th scope="row">事件处理器属性</th>
   <td>无</td>
  </tr>
 </tbody>
</table>

<h2 id="规范">规范</h2>

<p>不属于任何规范。</p>

<h2 id="浏览器兼容性">浏览器兼容性</h2>



<p>{{Compat("api.Element.beforescriptexecute_event")}}</p>

<h2 id="参见">参见</h2>

<ul>
 <li><code><a href="/zh-CN/docs/Web/API/Element/afterscriptexecute_event">afterscriptexecute</a></code> 事件</li>
</ul>