Skip to content

IpcRenderer does not execute normally in preload.js #21437

Description

@ChinaLiuxiaosong

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:
    • 7.1.3
  • Operating System:
    • Windows 10 (1909)
  • Last Known Working Electron version:
    • never

Expected Behavior

In preload.js, ipcRenderer.on can work when script loading.

Actual Behavior

In preload.js, ipcRenderer.on does not work while script loaded.

To Reproduce

https://gist.github.com/8beadb34f2123ee942968494edf439d0

Screenshots

image

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions