M
M
mrAndersen72021-02-03 17:05:35
JavaScript
mrAndersen7, 2021-02-03 17:05:35

How to handle errors in child iframe?

Site A from domain A inserts a frame (without src) into its code, which contains 2 scripts, both downloaded from domain B, one of the scripts does this window.addEventListener('error',()=>{}), in the logs I see errors like "Script error", and not the full text of the error , supposedly because the script and the frame have a different origin, how to get around this and what to do with it in order to see the full text of the error, only errors within the given frame are of interest, site A errors from domain A are not interesting.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question