3

I'm getting SCRIPT5022: SecurityError in zone.js (192,25) intermittently when I load an Angular component in an iframe on IE11.

Other than that the frame is working and I don't notice anything broken.

This is the code around the error:

            try {
                return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
            }
            catch (error) {
                if (this._zoneDelegate.handleError(this, error)) {
line 192:           throw error;
                }
            }

Does anyone know what is causing this error? I've also found this issue on github which looks the same - https://github.com/angular/zone.js/issues/1001.

sashoalm
  • 75,001
  • 122
  • 434
  • 781

2 Answers2

2

I fixed it using uberspeck's solution of adding the below 2 lines of code to my polyfills.ts file.

import 'core-js/es7/object';
import 'core-js/es7/array';
sashoalm
  • 75,001
  • 122
  • 434
  • 781
Myzifer
  • 1,116
  • 1
  • 20
  • 56
1

try to add this script in index.html

<script>
  __Zone_enable_cross_context_check = true;
</script>
Fateh Mohamed
  • 20,445
  • 5
  • 43
  • 52