Skip to content

preload scripts are being injected into _blank windows #6991

Closed

Description

@koush
  • Electron version:
    1.3.3
  • Operating system:
    OSX El Capitan

My app loads a BrowserWindow at custom://foo/bar. This window creation has a script preload.
That window has an tag (to an http link) that loads on a _blank target. If that is clicked, the new window automatically also uses the same preload.

Is this by design?

Activity

  1. MarshallOfSound commented on Aug 26, 2016

    @MarshallOfSound
    Member

    @koush Yes this is by design.

    A preload script assigned to a BrowserWindow or a WebView will always run on every page load before all scripts on that page.

  2. koush commented on Aug 26, 2016

    @koush
    Author

    @MarshallOfSound Thanks, that makes sense.

    Is there any way to override the behavior of clicking a _blank a tag link?

    I tried to replace window.open with no luck.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions