owing errors, but the result is invalid
and thus UA should [report the exception].
-->
<template id="constructor-returns-bad-object">
  <script>
'use strict';
window.errors = [];
// https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-attributes:handler-onerror
window.onerror = function (event, source, lineno, colno, error) {
  errors.push({
    event: event,
    source: source,
    lineno: lineno,
    colno: colno,
    error: error
  });
  return true; // Cancel the error event.
};

customE