Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

element.onafterscriptexecute

概述

当HTML文档中的<script>标签内的代码执行完毕时触发该事件,如果这个script标签是用appendChild()等方法动态添加上去的,则不会触发该事件.

语法

document.onafterscriptexecute = funcRef;

afterscriptexecute事件触发时,funcRef函数就会被调用. 传入参数eventtarget属性指向触发该事件的那个script元素.

例子

function finished(e) {
  logMessage("Finished script with ID: " + e.target.id);
}

document.addEventListener("afterscriptexecute", finished, true);

查看在线演示

规范

相关链接

文档标签和贡献者

 此页面的贡献者: teoli, khalid32, ziyunfei, zhangyaochun1987
 最后编辑者: khalid32,