1

I am trying to embed this Taboola code in my AMP pages

<amp-embed width=100 height=100
    type=taboola
    layout=responsive
    heights="(min-width:780px) 64%, (min-width:480px) 98%, (min-width:460px) 167%, 196%"
    data-publisher="amp-demo"
    data-mode="thumbnails-a"
    data-placement="Responsive example - AMP"
    data-article="auto">
</amp-embed>

but I get this error:

FPO - setup failed: Blocked a frame with origin "https://d-1038632027198192238.ampproject.net" from accessing a cross-origin frame.

Maybe Chrome is preventing a potential cross script security issue? Any way to fix it?

Andrew
  • 1,193
  • 7
  • 13
user3174311
  • 1,390
  • 1
  • 17
  • 37

1 Answers1

-1

Direct Javascript calls between frames and/or windows are only allowed if they conform to the same-origin policy. If your window and iframe share a common parent domain you can set document.domain to "domain lower") one or both such that they can communicate. Otherwise you'll need to look into something like the Message Passing. Since content scripts run in the context of a web page and not the extension, they often need some way of communicating with the rest of the extension.

Here's a related SO ticket which discuss about same origin policy: SecurityError: Blocked a frame with origin from accessing a cross-origin frame

Community
  • 1
  • 1
Android Enthusiast
  • 4,447
  • 2
  • 11
  • 27
  • yeah I know the theory for iframes but this is different, I am using , it doesn't look like it is rendered as an iframe so I am looking for a specific workaround – user3174311 Jul 25 '16 at 08:34