Skip to content

[Bug]: Uncaught illegal access when nodeIntegrationInSubFrames is true and iframes nested #31394

@WindTraveler

Description

@WindTraveler

Preflight Checklist

Electron Version

12.2.2

What operating system are you using?

macOS

Operating System Version

10.15.3

What arch are you using?

x64

Last Known Working Electron version

8.5.5

Expected Behavior

No Uncaught illegal access error in console and the html page is rendered normally

Actual Behavior

This issue is very similar to #27457.

The differernt thing is that my html page has one ifarme element which has many sub iframes inside.
image

When I try to remove some sub iframes such as sub iframe3 by using redux dispatch function, the error Uncaught illegal access occurs :

image

And the outside iframe gets empty:
image

This is my browser window options:

const mainWindow = new BrowserWindow({
    width: 376,
    height: 667,
    webPreferences: {
      nodeIntegration: true,
      nodeIntegrationInSubFrames: true,
      contextIsolation: false,
      enableRemoteModule: true,
    }
  });

What a pity I can not reproduce the issue in a simple demo.
Thanks in advance @codebytere.

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions