Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new Event support for extensible params #80

Merged
merged 2 commits into from
Feb 2, 2023

Conversation

MarshallOfSound
Copy link
Member

This adds support for these two new forms of syntax for declaring event objects:

Inline Params

#### Event: 'will-navigate'

Returns:

* `event` Event<>
  * `url` string - The URL the frame is navigating to.
  * `isSameDocument` boolean - Whether the navigation happened without changing
    document. Examples of same document navigations are reference fragment
    navigations, pushState/replaceState, and same page history navigation.
  * `isMainFrame` boolean - True if the navigation is taking place in a main frame.
  * `frame` WebFrameMain - The frame to be navigated.
  * `initiator` WebFrameMain (optional) - The frame which initiated the
    navigation, which can be a parent frame (e.g. via `window.open` with a
    frame's name), or null if the navigation was not initiated by a frame. This
    can also be null if the initiating frame was deleted before the event was
    emitted.
* `url` string _Deprecated_
* `isInPlace` boolean _Deprecated_
* `isMainFrame` boolean _Deprecated_
* `frameProcessId` Integer _Deprecated_
* `frameRoutingId` Integer _Deprecated_
Structure Referenced Params
#### Event: 'did-redirect-navigation'

Returns:

* `event` Event<[NavigationEventParams](structures/navigation-event-params.md)>
* `url` string _Deprecated_
* `isInPlace` boolean _Deprecated_
* `isMainFrame` boolean _Deprecated_
* `frameProcessId` Integer _Deprecated_
* `frameRoutingId` Integer _Deprecated_

This is pair with a ts-defs PR and electron/electron#37085 will be the first consumer.

src/markdown-helpers.ts Outdated Show resolved Hide resolved
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
@MarshallOfSound MarshallOfSound merged commit c11b637 into main Feb 2, 2023
@MarshallOfSound MarshallOfSound deleted the event-handling branch February 2, 2023 00:02
@continuous-auth
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants