Skip to content

nodeIntegrationInSubFrames webview attribute causes preload script to run multiple times #18429

Closed

Description

@Tim91084

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    5.0.1
  • Operating System:
    windows
  • Last Known Working Electron version:
    n/a

Expected Behavior

A preload script should run only 1 time for each webContents / iframe

Actual Behavior

The preload script appears to run multiple times

To Reproduce

https://github.com/Tim91084/electron-node-subframe-issue/tree/node-in-subframe-runs-too-often

$ git clone https://github.com/Tim91084/electron-node-subframe-issue.git -b node-in-subframe-runs-too-often
$ npm install
$ npm start || electron .

Screenshots

image

Activity

  1. codebytere commented on May 23, 2019

    @codebytere
    Member
  2. miniak commented on Jul 15, 2019

    @miniak
    Contributor

    @Tim91084 does it reproduce in Electron 6?

  3. miniak commented on Jul 15, 2019

    @miniak
    Contributor

    This issue is not platform dependent, I have a repro on Mac as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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