Closed document in error handlers

Confirmed Issue #9484577 • Assigned to Travis L.


Oct 23, 2016
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

This HTML produces “Hello World” on Chrome, Safari and Firefox (after was fixed), but on IE11 it produces “World” and on Edge it produces "Hello":

<!DOCTYPE html>
errorHandler = function() {
<script src=’’ onerror=’errorHandler()'></script>

Actual results:

By the time the error handler runs, Edge has already closed the document and it thus overwrites all existing content by re-opening it. The final result is “Hello”

Expected results:

In Chrome, Safari and Firefox the document is still open, and thus the final result is "Hello World!". Is Edge’s behaviour caused by speculative parsing?


1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Ibrahim O.”

    Changed Assigned To to “Travis L.”

    Changed Status to “Confirmed”

  • Hello Travis,

    thanks for picking up the issue and confirming it.
    Do you have any details on why this is happening and if there is anything a web dev can do to avoid this issue?


You need to sign in to your Microsoft account to add a comment.

Sign in