PolymerElements / app-storage

Data-pipes and specialized services
61 stars 47 forks source link

app-local-storage-document uses window.top, crashing iframes #97

Closed TimvdLippe closed 4 years ago

TimvdLippe commented 7 years ago

Description

Including the app-local-storage-document in a website which is then included using a iframe, crashes the website.

Expected outcome

The element does not crash the iframe

Actual outcome

Because app-local-storage-document uses window.top in the attached, the following error is thrown:

Blocked a frame with origin from <> accessing a cross-origin frame

Live Demo

Steps to reproduce

  1. Put a app-local-storage-document element in the website X.
  2. Deploy the website on origin X.
  3. Build a website Y which includes an iframe pointing to X.
  4. Opening Y will crash the iframe of X, because window.top is used.

Browsers Affected

moderndeveloperllc commented 7 years ago

@TimvdLippe Do you know if this element is being actively developed anymore? No real correspondence on tickets since April and PRs left uncommented upon.

shalarim commented 5 years ago

I am experiencing similar behavior. Customer has requested site be deployed within an Iframe. This is causing CORS errors and very inconsistent behavior.

I am created a local copy of this component and changed all window.top references to window.self.