electron/lib/renderer
Samuel Maddock f943db7ad5 feat: Add content script world isolation (#17032)
* Execute content script in isolated world

* Inject script into newly created extension worlds

* Create new content_script_bundle for extension scripts

* Initialize chrome API in content script bundle

* Define Chrome extension isolated world ID range

1 << 20 was chosen as it provides a sufficiently large range of IDs for extensions, but also provides a large enough buffer for any user worlds in [1000, 1 << 20).

Ultimately this range can be changed if any user application raises it as an issue.

* Insert content script CSS into document

This now avoids a script wrapper to inject the style sheet. This closely matches the code used by chromium in `ScriptInjection::InjectCss`.

* Pass extension ID to isolated world via v8 private
2019-03-11 16:27:57 -07:00
..
api refactor: use ipcRendererUtils.invoke / ipcMainUtils.handle for desktopCapturer.getSources() (#16619) 2019-03-07 15:31:25 -08:00
extensions chore: remove unused catch bindings (#16121) 2019-02-21 09:26:07 +00:00
web-view build: fix new TS linting errors (#17279) 2019-03-07 17:18:10 -08:00
callbacks-registry.js refactor: don't expose CallbacksRegistry as an internal module (#14389) 2018-08-31 11:29:00 -07:00
chrome-api.ts refactor: Port chrome-api to TypeScript (#17014) 2019-02-19 13:09:44 +00:00
content-scripts-injector.ts feat: Add content script world isolation (#17032) 2019-03-11 16:27:57 -07:00
init.ts feat: add support for content scripts 'all_frames' option (#17258) 2019-03-08 15:53:25 -08:00
inspector.ts refactor: Port inspector to TypeScript (#16943) 2019-02-25 18:10:25 -08:00
ipc-renderer-internal-utils.ts refactor: merge ipcMainUtils.handle / handleSync (#17062) 2019-02-26 15:48:26 -08:00
ipc-renderer-internal.ts refactor: Port renderer-internal to TypeScript (#16939) 2019-02-14 17:24:25 -08:00
remote.ts refactor: Port getRemote to TypeScript (#16938) 2019-02-14 04:04:53 -10:00
security-warnings.ts chore: remove unused catch bindings (#16121) 2019-02-21 09:26:07 +00:00
web-frame-init.ts refactor: Split 'Event' docs/types into more specific Event types (#17038) 2019-02-19 09:24:19 +00:00
window-setup.ts chore: remove unused catch bindings (#16121) 2019-02-21 09:26:07 +00:00