Element: beforescriptexecute event
{{APIRef("DOM")}}{{Non-standard_header}}
[!WARNING] This event was a proposal in an early version of the specification. Do not rely on it.
The beforescriptexecute event is fired when a script is about to be executed. Canceling the event prevents the script from executing.
It is a proprietary event specific to Gecko (Firefox).
Syntax
Use the event name in {{domxref("EventTarget/addEventListener", "addEventListener()")}}:
addEventListener("beforescriptexecute", (event) => { })
Alternatively, assign to the event handler property of the interface:
onbeforescriptexecute = (event) => { }
Event type
A generic {{domxref("Event")}}.
Specifications
Not part of any specification.
Browser compatibility
{{Compat}}
See also
afterscriptexecuteevent
这篇文档对你有帮助吗?
谢谢你的反馈!