Skip to content

Commit

Permalink
fix: bypass IE11 SCRIPT5045
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Feb 18, 2020
1 parent 0929c9d commit a86710c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ require('source-map-support').install();

// delay window.close
var close = window.close;
window.close = function () {
// ['c' + 'lose'] is to bypass IE11 SCRIPT5045:
// Assignment to read-only properties is not allowed in strict mode
window['c' + 'lose'] = function () {
setTimeout(function () {
close.call(window);
}, 1000);
Expand Down

0 comments on commit a86710c

Please sign in to comment.