The reason for this error displayed in the console in Webkit browsers is well known and clearly described in the error text:
An unsafe JavaScript attempt to access with the iframed-content-example.com URL from a frame with the URL www.example.com. Domains, protocols, and ports must be consistent.
But for large sites with a lot of possible code fragments causing the error (ads, third-party libraries, site scripts), the error message is not very useful for tracking and debugging the line of code that caused the problem. Is there a way to initiate a stack trace when a cross-domain error occurs ?
source share