Exception object is undefined in content scripts

Confirmed Issue #8057607 • Assigned to Scott S.

Details

Author
Sergey K.
Created
Jul 1, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14379
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

  1. Load the extension attached.
  2. Navigate to some https site that sets CSP, https://ya.ru for example.
  3. Open developer tools (F12), select Console.
  4. Reload the site.

Expected: exception message should be printed to the console (“SecurityError”).
Actual: SCRIPT5007: Unable to get property ‘message’ of undefined or null reference.

The content script in this extension is:

try {
    new WebSocket("wss://twitter.com/")
} catch (e) {
    console.log(e.message)
}

This code works in the console when _top target is selected but doesn’t work in the context of the content script.

Microsoft Edge 38.14379.0.0
Microsoft EdgeHTML 14.14379

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Ibrahim O.”

    Changed Assigned To to “Sermet I.”

    Changed Assigned To from “Sermet I.” to “Ibrahim O.”

    Changed Assigned To to “Sermet I.”

    Changed Assigned To from “Sermet I.” to “Scott S.”

    Changed Status to “Confirmed”

  • The Edge team is working on a fix for a future update.

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

Sign in