[Feature Request]: setPermissionRequestHandler should pass the requesting frame in the details
- Dominant language
- C++
- Stars
- 123k
- Forks
- 17.5k
- Avg merge
- 14h 28m
- Merged PRs (30d)
- 870
Description
### Preflight Checklist
- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.
### Problem Description
[session.setPermissionRequestHandler](https://www.electronjs.org/docs/api/session#sessetpermissionrequesthandlerhandler) provides a `webContents` and `isMainFrame`, but there is no way to know which specific frame the permission request came from.
### Proposed Solution
Provide a reference to the specific frame which originated the request, as a `WebFrameMain` in the `details` structure.
### Alternatives Considered
I think if we were designing this API today we'd pass a `WebFrameMain` as the first arg instead of a `WebContents`, but for back compat let's add the frame to the details.
### Additional Information
NA
Contributor guide
Assessment
This issue has not been assessed yet.