I work in adtech company and have a problem when i try and access an safeframe returned by google adx
I need to get a href or img inside the safeframe to check if ad is coming or not as if to find if anything is coming or no ad is being sent.
When i try and access the contents of the safeframe I get error:-
Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://www.somerandomname.com" from accessing a cross-origin frame.
What should i do in this case as finding out if no ad or ad is returning is important in business sense.