electron/lib/browser/api
Samuel Attard 58a6fe13d6
feat: preloads and nodeIntegration in iframes (#16425)
* feat: add support for node / preloads in subframes

This feature has delibrately been built / implemented in such a way
that it has minimum impact on existing apps / code-paths.
Without enabling the new "nodeSupportInSubFrames" option basically none of this
new code will be hit.

The things that I believe need extra scrutiny are:

* Introduction of `event.reply` for IPC events and usage of `event.reply` instead of `event.sender.send()`
* Usage of `node::FreeEnvironment(env)` when the new option is enabled in order to avoid memory leaks.  I have tested this quite a bit and haven't managed to cause a crash but it is still feature flagged behind the "nodeSupportInSubFrames" flag to avoid potential impact.

Closes #10569
Closes #10401
Closes #11868
Closes #12505
Closes #14035

* feat: add support preloads in subframes for sandboxed renderers

* spec: add tests for new nodeSupportInSubFrames option

* spec: fix specs for .reply and ._replyInternal for internal messages

* chore: revert change to use flag instead of environment set size

* chore: clean up subframe impl

* chore: apply suggestions from code review

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>

* chore: clean up reply usage

* chore: fix TS docs generation

* chore: cleanup after rebase

* chore: rename wrap to add in event fns
2019-01-22 11:24:46 -08:00
..
auto-updater refactor: add prefer-const to .eslintrc + fix errors (#14880) 2018-10-02 11:56:31 +10:00
exports chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
views view: add ResizeArea class (#15752) 2018-11-21 22:39:59 +09:00
app.js feat: enable mixed-sandbox mode by default (#15894) 2019-01-22 10:44:28 -08:00
auto-updater.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
browser-view.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
browser-window.js fix: move window.open handlers from BrowserWindow to WebContents 2018-11-27 10:59:01 +09:00
content-tracing.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
crash-reporter.js refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals (#13940) 2018-10-07 00:48:00 +13:00
dialog.js refactor: add prefer-const to .eslintrc + fix errors (#14880) 2018-10-02 11:56:31 +10:00
global-shortcut.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
in-app-purchase.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
ipc-main.js refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals (#13940) 2018-10-07 00:48:00 +13:00
menu-item-roles.js feat: make zoomLevel/zoomFactor sync (#16410) 2019-01-20 23:40:27 -08:00
menu-item.js feat: add registerAccelerator flag to allow menu items to optionally skip accelerator registration (#15723) 2018-11-26 10:43:55 -08:00
menu-utils.js fix: ability to fetch separators by id (#15290) 2018-10-19 13:09:40 -07:00
menu.js feat: use default-app behavior in packaged apps (#16310) 2019-01-15 21:35:53 +01:00
module-list.js refactor: don't expose NavigationController as an internal module (#15920) 2018-12-03 17:13:09 +01:00
net-log.js refactor: create request context from network context (#14656) 2018-10-04 13:08:56 -05:00
net.js refactor: add prefer-const to .eslintrc + fix errors (#14880) 2018-10-02 11:56:31 +10:00
notification.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
power-monitor.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
power-save-blocker.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
protocol.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
screen.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
session.js test: ensure legacy callback functions work (#16436) 2019-01-17 14:17:16 -08:00
system-preferences.js feat: remove needless mojave dark mode APIs and add instructions on how to use the macOS replacement (#14895) 2018-10-02 14:44:50 +10:00
top-level-window.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
touch-bar.js chore: remove deprecated touch-bar API (#15650) 2018-11-09 17:00:19 +11:00
tray.js chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
view.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
web-contents-view.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
web-contents.js feat: preloads and nodeIntegration in iframes (#16425) 2019-01-22 11:24:46 -08:00