Iframes created with an Edge Extension cannot access window.parent or window.top

Confirmed Issue #19091311 • Unassigned

Details

Author
Seva L.
Created
Sep 24, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

This code used to work sometime before June.

I have made a simple extension to demonstrate the issue. The extension injects a content script which adds an iframe to the page.
The content script then sends a message to the iframe to demonstrate that messages can be sent in that direction.
The iframe logs any received messages and then tries to access window.parent.
In the page inspector logs you will see permission denied for both window.top and window.parent.

extension.zip is the extension built with webpack. The source is attached as well. You can build the extension yourself by installing Node and NPM, then running:
npm install (download all the necessary packages)
npm run build (will output extension to ./build/prod)

To reproduce the issue:

  1. Install the supplied extension
  2. Navigate to any page that isn’t the edge landing page or about:blank
  3. Right click on the page and select inspect element.
  4. Click the Console tab.
  5. You should see the relevant errors in the iframe.js script logged there.

Attachments

2 attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Mahesh J.”

    Changed Status to “Confirmed”

    Changed Assigned To from “Mahesh J.” to “Utkarsh P.”

    Changed Assigned To from “Utkarsh P.” to “Ankit K.”

You need to sign in to your Microsoft account to add a comment.

Sign in