Milan Burda
c65a0d90b8
chore: misc cleanup ( #16037 )
2018-12-12 15:31:16 -06:00
Milan Burda
177091ca6f
chore: rename nativeRequire to potentiallyRemoteRequire ( #15971 )
2018-12-06 18:12:50 -08:00
Milan Burda
ab2a061b59
refactor: use helpers when using the remote module in sandboxed renderers ( #15960 )
2018-12-05 10:07:32 -08:00
Milan Burda
d561c5531b
feat: deprecate modules internally using remote.require in sandboxed renderer context ( #15145 )
2018-12-05 10:34:09 +01:00
Milan Burda
aa2b2f7c8f
fix: security: don't allow arbitrary methods to be invoked on webContents via IPC ( #15919 )
2018-12-04 16:12:21 +01:00
Cheng Zhao
ca7dec2082
fix: default prop of location should be empty str
2018-12-04 17:11:26 +09:00
Cheng Zhao
fc4e10b6c0
fix: set setter of window.location
2018-12-04 16:23:52 +09:00
Anrock
e80e3a53e9
feat: introduce LocationProxy for BrowserWindowProxy
2018-12-04 16:23:52 +09:00
Julien Isorce
1f55f1635f
feat: add support for DesktopCapturerSource.appIcon
...
Useful to get the icon of the application owning the source.
Only available for sources of type window, i.e. not for screen.
https://github.com/electron/electron/issues/14845
2018-12-04 15:42:49 +09:00
Milan Burda
8483cb4aa7
security: only handle related IPCs when <webview> tag is enabled ( #15859 )
...
* refactor: move guest-view-manager related IPC handling out of rpc-server
* feat: only handle related IPCs when <webview> tag is enabled
2018-11-30 18:44:38 +09:00
Samuel Attard
fe8965efa2
fix: use sendToAll method correctly in chrome-api ( #15518 )
2018-11-01 07:16:49 -07:00
Cheng Zhao
a8f2646ba6
Fix missing remote object error when calling remote function created in preload script ( #15444 )
...
* fix: report wrong context error based on contextId
* fix: destroyed remote renderer warning is now async
2018-10-31 11:26:57 -04:00
Shelley Vohr
d21d83cfc8
fix: folder open not working in devtools ( #15387 )
2018-10-25 08:36:48 -07:00
Adam Meyer
d43ef97a7b
add width to webview iframe ( #15195 )
2018-10-17 09:33:31 +09:00
Milan Burda
70c49b78ae
fix: Memory > Profiles > Load in DevTools ( #15151 )
2018-10-14 17:30:49 +11:00
Milan Burda
d3efc52745
feat: add webPreferences.enableRemoteModule option ( #13028 )
2018-10-13 20:50:07 +03:00
Milan Burda
9177dbb584
refactor: use boolean for nodeIntegration / webviewTag ( #15005 )
2018-10-08 15:51:31 +02:00
Milan Burda
b50f86ef43
refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals ( #13940 )
2018-10-07 00:48:00 +13:00
Milan Burda
5efb0fdff1
feat: add security warnings to sandboxed renderers ( #14869 )
...
Also refactor not to use the remote module.
2018-10-03 21:36:12 +02:00
Milan Burda
3ad3ade828
refactor: add prefer-const to .eslintrc + fix errors ( #14880 )
2018-10-02 11:56:31 +10:00
Milan Burda
d48f9bcf7f
refactor: implement <webview> methods via dedicated IPCs without the remote module ( #14377 )
2018-10-01 10:07:50 +09:00
Milan Burda
c61db523c7
refactor: replace var with const / let ( #14866 )
2018-09-29 09:17:00 +10:00
Milan Burda
b499d57cfd
refactor: use error-utils for remote exception serialization / deserialization ( #14788 )
...
* refactor: use error-utils for remote exception serialization / deserialization
* fix internal process.type in sandboxed renderer
2018-09-26 15:44:55 +10:00
Samuel Attard
176a76217c
chore: have 'use strict' consistently across our lib files ( #14721 )
2018-09-23 00:28:50 +12:00
Samuel Attard
32a9df2940
refactor: clean up the default app implementation ( #14719 )
...
* Disable nodeIntegration
* Enable contextIsolation
* Re-implement the CSP security check to handle running in
contextIsolation
* Disable bad DCHECKS for the promise helper
* Remove the unused "-d" flag for the electron binary
* Added a way to hide the default help output for electron devs who
don't want to see it every time
2018-09-21 15:24:42 +10:00
Samuel Attard
54ef906832
[RFC] perf: use an internal module resolver to improve require performance ( #14633 )
...
* perf: use an internal module resolver instead of relative requires
* perf: memoize the results of getting exported Electron properties
* perf: make internal module changes consistent across sandboxed / bundled files
2018-09-20 13:43:26 +10:00
Samuel Attard
558fff69e7
chore: update to standard 12
2018-09-14 14:57:01 +10:00
Milan Burda
0821edc843
refactor: cleanup web-frame-init.js ( #14516 )
...
* refactor: add error-utils.js
* fix exception handling for asyncWebFrameMethods
* remove dead code
* handle exceptions
* rename rehydratedError to deserializedError
* Revert "handle exceptions"
This reverts commit 396b179948b137f9e525e9ebba4f7c6e9bf19429.
2018-09-11 19:56:00 +10:00
Milan Burda
38419e3a6a
chore: address TODO for WebContents.prototype.setSize / reportRemovedAttribute removal ( #14517 )
...
* chore: remove WebContents.prototype.setSize
* chore: remove reportRemovedAttribute
* chore: remove unused fixtures
2018-09-11 17:58:57 +10:00
Cheng Zhao
92e094c5f6
fix: manually manage WebContents of webview when it is detached
2018-09-07 15:47:58 +09:00
Charles Kerr
c5820bfabb
fix: don't use deprecated fstatNoException API ( #14463 )
2018-09-06 13:06:32 -05:00
Cheng Zhao
10176c71ff
fix: webview.focus() should move page focus to webview ( #14427 )
2018-09-03 11:41:54 +09:00
Cheng Zhao
0ecea96048
fix: use flexbox to style webview ( #14400 )
...
* fix: use flexbox to style webview
* docs: remove notes on browserplugin based webview
2018-09-01 08:53:13 +12:00
Milan Burda
3a79eacb6f
refactor: don't expose CallbacksRegistry as an internal module ( #14389 )
2018-08-31 11:29:00 -07:00
Samuel Attard
1b7418fb7b
Revert "sec: deprecate some webPreference defaults to be secure-by-default ( #14284 )" ( #14380 )
...
This reverts commit 66d6ba8689
.
2018-08-30 09:57:49 +12:00
Samuel Attard
66d6ba8689
sec: deprecate some webPreference defaults to be secure-by-default ( #14284 )
...
* feat: deprecate default value of nodeIntegration
* Use DeprecationStatus::Stable as the default instead of shadowing
* change wording of deprecations
* chore: also deprecate kWebviewTag and kContextIsolation
* chore: do as we preach, lets be secure-by-default in the default app
2018-08-29 13:14:04 -05:00
John Kleinschmidt
865435c491
Merge pull request #14287 from electron/miniak/ipc-refactoring
...
refactor: move common logic to handleRemoteCommand (rpc-server.js)
2018-08-28 17:06:38 -04:00
Cheng Zhao
459a2304b4
fix: emit focus/blur events for webview ( #14344 )
...
* fix: emit focus/blur events for webview
* test: webview can emit focus event
2018-08-28 13:35:44 -05:00
Milan Burda
28e4fcea3b
refactor: move common logic to handleRemoteCommand
2018-08-27 21:06:03 +02:00
Milan Burda
c23e7fa101
refactor: implement ipcRenderer.sendTo in native code for better performance ( #14285 )
2018-08-24 14:14:39 -07:00
Cheng Zhao
6736d4ef29
fix: do not bubble up resize event from webview ( #14271 )
2018-08-23 15:42:35 +09:00
Cheng Zhao
cd8bb1d3b4
chore: print error when removed webview attribute is used ( #14230 )
...
* chore: print error when removed webview attribute is used
* docs: document removed webview features
2018-08-23 10:45:43 +09:00
Cheng Zhao
dd5b8769be
fix: use OOPIF for webview tag ( #13869 )
...
* fix: use OOIF for webview tag
* fix: do not call GetNativeView for webview
* fix: OOIPF webview's WebContents is managed by embedder frame
* fix: guest view can not be focused
* fix: clear zoom controller when guest is destroyed
* fix: implement the webview resize event
The webview is no longer a browser plugin with the resize event, use
ResizeObserver instead.
* test: disable failed tests due to OOPIF webview
* fix: embedder can be destroyed earlier than guest
This happens when embedder is manually destroyed.
* fix: don't double attach
* fix: recreate iframe when webview is reattached
* fix: resize event may happen very early
* test: some tests are working after OOPIF webview
* chore: remove unused browser plugin webview code
* fix: get embedder via closure
When the "destroyed" event is emitted, the entry in guestInstances would be
cleared.
* chore: rename browserPluginNode to internalElement
* test: make the visibilityState test more robust
* chore: guestinstance can not work with OOPIF webview
* fix: element could be detached before got response from browser
2018-08-16 15:57:40 -07:00
Charles Kerr
29f07889e6
feat: add location url to "Node.js Integration with Remote Content" warning ( #13973 )
...
* docs: fix typo
* feat: add location url to Node+Remote warning
2018-08-07 20:40:21 -05:00
Cheng Zhao
305e3aad40
refactor: remove private webContents.getId() API ( #13674 )
2018-07-23 18:08:36 +09:00
Cheng Zhao
9d6f1a372e
fix: create WebContents for webview on request ( #13713 )
2018-07-21 11:11:28 +09:00
Cheng Zhao
e2029435c4
fix: use context counter as contextId
...
For sandboxed renderer it may not have a node::Environment in the context,
using a increasing counter as contextId works for all cases.
2018-07-19 11:00:10 -07:00
Shelley Vohr
6045d1218a
refactor: remove experimentalCanvasFeatures property ( #13684 )
2018-07-16 13:32:42 -07:00
Felix Rieseberg
deedf6c3f4
feat: Add isCurrentlyAudible() to WebContents ( #13614 )
...
* 🔧 Add isCurrentlyAudible() to WebContents
* ❤️ Implement feedback, use await to wait for event
* 👷 Add missing imports
2018-07-12 21:35:11 +10:00
Cheng Zhao
4cdb1b8fc3
fix double-freeing remote references
...
After the page does navigations, garbage collection can still happen in
the old context. This commit changes to store references to remote objects
by _pages_, instead of by _WebContents_.
2018-07-12 10:44:26 +09:00
deepak1556
7b47d69efe
Remove did-get-response-details and did-get-redirect-request events
...
https://chromium-review.googlesource.com/c/chromium/src/+/805008
https://chromium-review.googlesource.com/c/chromium/src/+/786320
2018-06-19 11:49:41 +10:00
Alexey Kuzmin
dee9aef975
Add "enable_desktop_capturer" build flag ( #13133 )
...
* Make it possible to disable a module for a renderer
* Put DesktopCapturer API under a build flag
The name is "enable_desktop_capturer".
Enabled by default.
2018-06-13 11:15:34 -05:00
Thiago de Arruda
6ff111a141
perf: don't use JSON to send the result of ipcRenderer.sendSync
. ( #8953 )
...
* Don't use JSON to send the result of `ipcRenderer.sendSync`.
- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
to wrap/unwrap return values to/from array, instead of
serializing/deserializing JSON.
This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).
A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory. This difference
tends increases with larger buffers.
* Don't base64 encode Buffers
* Don't allocate V8ValueConverter on the heap
* Replace hidden global.sandbox with NodeBindings::IsInitialized()
* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter
* Refactor problematic test to make it more reliable
* Add tests for NaN and Infinity
2018-06-13 17:38:31 +10:00
Charles Kerr
b89fe86fa1
Merge pull request #13050 from electron/3.0.0-deprecations
...
chore: removal of 3.0.0 deprecations
2018-05-30 09:25:36 +02:00
Milan Burda
4cfe5ecaa4
add proper support for typed arrays in remote ( #13055 )
2018-05-24 21:05:46 +09:00
Shelley Vohr
322a303683
address changes from review
2018-05-23 15:57:58 -07:00
Shelley Vohr
5f5322c64e
rename blinkFeatures to enableBlinkFeatures
2018-05-23 14:01:34 -07:00
Thiago de Arruda
6f076f7433
Refactor sandbox preload initialization. ( #12877 )
...
Use a single synchronous IPC call to retrieve data required by early
sandbox scripts. This has two purposes:
- Optimize preload script initialization by:
- Using one synchronous IPC call to retrieve preload script,
webContentsId (more on that later), process.{platform,execPath,env}
- Lazy loading as many modules as possible.
- Fix #12316 for sandbox. @MarshallOfSound addressed the issue in
#12342 , but it was still present in sandbox mode. By loading
webContentsId very early and skipping remote module at early
startup, we fix it for sandbox.
2018-05-21 22:56:05 +10:00
biuuu
86d023b02f
fix: listeners out of limit warning ( #12841 )
...
When the Chrome Extension has too many content scripts (above default
10 counts), there will be a warning: possible EventEmitter memory leak
detected. 11 listeners added.
2018-05-08 14:10:11 +09:00
bughit
55a7f6f0ce
add did-frame-navigate event to WebContents ( #12723 )
...
* add did-frame-navigate event to WebContents, pass http response code to it and did-navigate
* docs for frame routing id related api changes on WebFrame and WebContents
2018-05-01 13:34:41 +09:00
bughit
4fcd178c36
expose WebFrame#routingId ( #12614 )
...
* expose WebFrame#routingId and pass it to WebContents frame specific events along with frameProcessId; add WebContets.did-start-navigation event
* fix compilation error on ia32 Windows
2018-04-26 19:17:55 +09:00
Tatsuya Hiroishi
9c65abd746
handle remote exception ( #12694 )
...
* add cause property to exception in callFunction
* update exceptionToMeta function
* add sender argument
* and cause property to return value
* update exception convert in metaToValue function
* add from and cause properties to the exception error
* unit test for remote exception
2018-04-24 08:40:19 -04:00
Nitish Sakhawalkar
2579071b98
Deprecate did-get-response-details and did-get-redirect-request ( #12615 )
...
* Deprecate webContents events did-get-response-details and did-get-redirect-request.
* Update guest view files
* Update webview tag docs and update specs
* Update deprecate.event function
* Update comment
* Update more
* Update documentation for other deprecated event
2018-04-23 14:46:12 -05:00
Jeremy Apthorp
97fb15ac49
Enable WebFrame method forwarding in sandboxed renderers ( #12538 )
...
* Enable WebFrame method forwarding in sandboxed renderers
Fixes #9073
* Non-change to kick CI
2018-04-12 11:57:40 +10:00
Andrew MacDonald
6bfb122cd1
Add a display_id parameter to the desktopCapturer API. ( #12417 )
...
* Add a screen_api_id parameter to the desktopCapturer API.
When using the DirectX capturer on Windows, there was previously no way
to associate desktopCapturer/getUserMedia and electron.screen API
screens. This new parameter provides the association.
* Fix non-Windows build.
* Fix Mac.
* Fix Mac harder.
* JS lint
* clang-format C++ code.
* IWYU
* display_id, Linux comment, better test
* lint
* Fix tests on Linux.
* Add display_id documentation.
2018-04-09 14:43:35 +09:00
Samuel Attard
0ac883c6d4
Remove the race condition between new process creation and context release ( #12342 )
...
* Remove the race condition between new process creation and old process releasing remote context
Previously there was a race condition where the getId() method would return the new context ID even
though the release was for the old context. This changes it to send the "initial" context ID with
the release message to ensure there is no race.
* fetch context ID from remote in sandbox mode
2018-03-20 15:54:47 +11:00
Felix Rieseberg
243ab45111
🔧 Fix security warning ( #12309 )
2018-03-16 06:21:38 +09:00
Charles Kerr
c2673aa970
Set appropriate defaults for webview options ( #12271 )
...
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values
* Test inherited default propogation
* Refactor to remove coupling from fetching values and defaults
* Test description type
* Fix up tests
2018-03-15 13:56:46 +09:00
Shelley Vohr
9aeb61181a
Fix require on network share path ( #12282 )
...
* first pass at server/network require fix
* refactor for clarity
2018-03-15 11:45:13 +09:00
Felix Rieseberg
71795ecc62
fix: Incorrect warnings in webviews ( #12234 )
...
* 🔧 Get correct webContents
* 🔧 Err, webPreferences
2018-03-13 10:55:32 +09:00
Samuel Attard
795447f61a
Implement dialog (alert/confirm) blocking as a user switch after the first dialog
...
* This is to enable more browser-like behavior so that users who run third-party code
will not be DOS'ed with alerts and confirms. This is already handled like this
in most major browsers so this will greatly help these developers
2018-03-06 11:19:15 +09:00
John Kleinschmidt
2a97e48465
Merge pull request #11968 from electron/refactor-menu-popup
...
Refactor menu.popup
2018-02-21 14:29:52 -05:00
Charles Kerr
708f39a1a5
update a few menu.popup() calls to use the new API
2018-02-20 14:02:24 -06:00
Shelley Vohr
211b542ae4
remove setZoomLevelLimits
2018-02-20 08:57:48 -05:00
Felix Rieseberg
d586ef2f39
feature: Hot security tips ( #11810 )
...
* 🔧 Add security issue detection (and logs)
* 🔧 Check for it on load
* 👷 Add some tests
* 👷 Make the linter happy
* 🔧 Allow them to be enabled by force
* 📝 Make message slightly prettier
* 🔧 Fix a typo in the code comment
* 🔧 Classic mistake
* 🚀 Optimize things a bit more
* 👷 Add tests, fix tests
* 📝 Document things
* 🔧 Make linter happy
* 🔧 One more piece of cleanup
2018-02-03 07:50:12 -07:00
Shelley Vohr
b74304145e
createShadowRoot => attachShadow
2018-01-31 19:29:23 -05:00
Zhuo Lu
d45914c3f7
MenuItem roles camelCase-compatible
2017-12-28 13:28:20 +08:00
Cheng Zhao
cb3a9c69ab
Add a SessionPreferences to manage session related data
...
By design the BrowserClient should not be aware of the api:: classes.
2017-12-05 15:59:15 +09:00
Samuel Attard
d9359d8b6c
s/global/session in constants
2017-12-05 11:35:53 +09:00
Samuel Attard
d2707315e6
s/global/session
2017-12-05 11:35:53 +09:00
Samuel Attard
0ddd078aaf
Add ability to set global preload scripts
2017-12-05 11:35:27 +09:00
Cheng Zhao
59476f0b30
Create webContents for webview even when src is not set
2017-12-01 10:35:23 +09:00
Felix Rieseberg
f7d6e3fa7b
🔧 Disable standard/no-callback-literal where necessary
2017-11-23 13:53:03 -08:00
Charles Kerr
5eb00e45aa
Merge pull request #11158 from electron/execute-errors
...
fix: Pass on errors thrown in `executeJavaScript`
2017-11-20 09:14:05 -06:00
Ronald Eddy
14c6e78147
Update electron.atom.io -> electronjs.org
...
Update electron.atom.io -> electronjs.org to reduce redirects and speed navigation.
2017-11-19 04:01:33 -08:00
Felix Rieseberg
1dea186a6e
:thinking_face: What if you could return an Error?
2017-11-18 00:50:53 -08:00
Shelley Vohr
8736a41cfb
Merge pull request #10909 from electron/update_remote
...
Simplify and remove excess code from remote module
2017-11-03 09:16:28 -04:00
Shelley Vohr
803fa35484
fix null value check
2017-11-03 08:47:21 -04:00
Shelley Vohr
2b2c7d7f9f
fix object serialization test issue
2017-11-02 21:29:17 -04:00
Shelley Vohr
5c318932c2
add some structural changes
2017-11-02 21:07:40 -04:00
Charles Kerr
1c09dede1a
singletons that are retroactively turned into EventEmitters should call the EventEmitter ctor
2017-11-01 23:05:27 -05:00
John Kleinschmidt
beb06c0787
Merge pull request #10537 from qazbnm456/improve-content_scripts.css
...
[Security] Use textContent instead innerHTML to remediate DOM based XSS
2017-10-26 11:51:43 -04:00
Shelley Vohr
5f6f117bad
changes from review
2017-10-25 23:41:11 -04:00
Shelley Vohr
d4880b135a
revert ipc lookup table
2017-10-25 15:36:16 -04:00
Shelley Vohr
c0f2a7b44a
fix standard issues
2017-10-25 09:56:02 -04:00
Shelley Vohr
f129622446
clean up remote
2017-10-25 09:51:21 -04:00
Shelley Vohr
7593bec687
update reviewed items
2017-10-24 19:36:06 -04:00
Shelley Vohr
b58ceae69c
appease linter gods
2017-10-24 12:28:15 -04:00
Shelley Vohr
43e118fe45
update desktop capturer and remove unnessary vars
2017-10-24 12:01:51 -04:00
Felix Rieseberg
2bd8877be3
🔧 String comparison
2017-10-07 08:26:32 -07:00
Felix Rieseberg
63749e281d
🔧 Linters gotta lint
2017-10-06 13:36:54 -07:00
Felix Rieseberg
11ac780caf
🔧 Add security warning
2017-10-06 13:02:54 -07:00
Boik
16499358b3
fix lint
2017-09-17 14:09:12 +08:00
Boik
d86724f17a
code improvement
2017-09-17 13:56:22 +08:00
Boik
26e6f2c46c
use textContent instead innerHTML to remediateDOM based XSS vulnerbilities
2017-09-17 11:27:03 +08:00
Alexandre Lachèze
e1a232e7c8
Add support for css in content_scripts
2017-09-14 17:23:33 +09:00
Cheng Zhao
bd87982b5c
Merge pull request #10075 from alexstrat/fix/fix-content_scripts-match
...
Fix content scripts matches
2017-07-24 15:27:55 +09:00
Cheng Zhao
25f168cecb
Merge pull request #9951 from alexstrat/fix-chrome-storage
...
Fix chrome storage access scope
2017-07-24 14:01:15 +09:00
Alexandre Lachèze
a2ba4e0a6a
fix content scripts matches
2017-07-20 20:01:49 +02:00
Alexandre Lachèze
498f344e2e
Correct mkdir
2017-07-20 19:50:55 +02:00
Kevin Sawicki
553021bc9c
Only assign opener when not using nativeWindowOpen
2017-07-17 11:55:15 -07:00
Alexandre Lachèze
ec8407c65d
Recursively mkdir the parent directories
2017-07-11 00:56:45 +02:00
Alexandre Lachèze
c85f3cbd2c
Change storage implementation to async
2017-07-11 00:35:53 +02:00
Alexandre Lachèze
9aac8967aa
👕
2017-07-10 23:56:44 +02:00
Alexandre Lachèze
969c74b886
Use es6 string templating
2017-07-10 23:50:59 +02:00
Alexandre Lachèze
73e8769b1f
content_scripts[].matches use the URL without hash part
2017-07-07 04:14:36 +02:00
Alexandre Lachèze
ec10338364
Per-extension storage
2017-07-07 03:13:19 +02:00
Alexandre Lachèze
d2002ff3fc
Use a file as Chrome Storage rather than localStorage
2017-07-07 03:06:53 +02:00
Birunthan Mohanathas
7d2226e05e
Let Chromium manage document.visibilityState
and document.hidden
...
Chromium already includes the necessary plumbing to manage the
visibility properties and `visibilitychange` event so this gets rid of
most of our custom logic for `BrowserWindow` and `BrowserView`.
Note that `webview` remains unchanged and is still affected by the issues
listed below.
User facing changes:
- The `document` visibility properties and `visibilitychange` event are
now also updated/fired in response to occlusion changes on macOS. In
other words, `document.visibilityState` will now be `hidden` on macOS
if the window is occluded by another window.
- Previously, `visibilitychange` was also fired by *both* Electron and
Chromium in some cases (e.g. when hiding the window). Now it is only
fired by Chromium so you no longer get duplicate events.
- The visiblity state of `BrowserWindow`s created with `{ show: false }`
is now initially `visible` until the window is shown and hidden.
- The visibility state of `BrowserWindow`s with `backgroundThrottling`
disabled is now permanently `visible`.
This should also fix #6860 (but not for `webview`).
2017-06-06 15:16:01 -07:00
Kevin Sawicki
a285a3e64b
Default webviewTag to false
2017-05-17 14:01:45 -07:00
Kevin Sawicki
bde13353fb
Rename option to webviewTag and default to nodeIntegration value
2017-05-17 13:12:23 -07:00
Kevin Sawicki
837ea884de
Merge remote-tracking branch 'origin/master' into enable-webview
2017-05-17 12:45:29 -07:00
Thiago de Arruda
6b5bd3b6ce
Fix how rpc-server releases references after page reload
...
In addition to listening for "render-view-deleted", listen for
"ELECTRON_BROWSER_CONTEXT_RELEASE" synchronous message, which is sent by the
remote module when the page is about to be navigated.
This is required to allow child windows running in the same renderer to
correctly manage remote object references, since `render-view-deleted` is only
called when the renderer exits.
Close #9387
2017-05-16 09:05:52 -03:00
HariJ
a05eb9047e
Fixing missed variable name
2017-05-08 18:50:20 -07:00
Hari Krishna Reddy Juturu
3321f7d39c
Changing command line option name
2017-05-08 17:27:31 -07:00
Hari Krishna Reddy Juturu
94d054cf11
Add option to override webview security
2017-05-06 22:10:42 -07:00
Hari Krishna Reddy Juturu
b4a8ed01f1
PR 44648: Enabling creation on webview with node-integration disabled and raising events
...
- Enabling creation on webview with node-integration disabled and raising events
Conflicts:
lib/browser/guest-view-manager.js
2017-05-06 20:50:01 -07:00
Ryohei Ikegami
1d73e84a29
Merge branch 'master' into native-window-open
2017-04-27 12:03:55 +09:00
Kevin Sawicki
95ef422ab4
Coerce offset to number in renderer process
2017-04-26 12:37:16 -07:00
Kevin Sawicki
2c48300daa
Fix typos in comment
2017-04-26 09:09:42 -07:00
Kevin Sawicki
246937a372
Convert targetOrigin to string in render process
2017-04-26 09:08:47 -07:00
Kevin Sawicki
3894c1c625
Convert frameName/features to strings in render process
2017-04-26 09:08:47 -07:00
Kevin Sawicki
05b6d91bf4
Disable node integration in chrome-devtools: URLs
2017-04-25 13:36:08 -07:00
Kevin Sawicki
c90fd4dc88
Convert message/title to strings in render process
2017-04-24 09:15:01 -07:00
Kevin Sawicki
a004cada7c
Merge pull request #9095 from seanchas116/better-path-resolve
...
Search for module from app path when URL is not file protocol
2017-04-20 10:49:53 -07:00
Ryohei Ikegami
8dff29185b
Merge branch 'master' into native-window-open
2017-04-18 21:59:22 +09:00
Kevin Sawicki
7065123266
Wrap remote value being set as an arg
2017-04-04 11:18:16 -07:00
Ryohei Ikegami
61fa8693d2
Merge branch 'master' into native-window-open
2017-04-04 20:54:37 +09:00
Ryohei Ikegami
4a7eec8f2d
Pass app path as command line argument
2017-04-04 09:36:01 +09:00
Kevin Sawicki
e85e483c71
Parse setting response to surface thrown errors
2017-04-03 12:16:51 -07:00
Ryohei Ikegami
001d03c859
Do not add search paths in devtools
2017-04-03 22:40:36 +09:00
Ryohei Ikegami
50c99e4507
Search for module under the app directory
2017-04-03 20:19:10 +09:00
Ryohei Ikegami
6f9dbd4e04
Merge branch 'master' into native-window-open
2017-03-24 00:11:43 +09:00
Cheng Zhao
bb5ad4ac05
Correctly initialize Node environment in worker
2017-03-20 12:52:45 -07:00
Kevin Sawicki
286f529968
Merge pull request #8890 from twolfson/dev/proxy.to.string.sqwished
...
🐛 Add toString support to remote functions
2017-03-20 09:35:51 -07:00
Ryohei Ikegami
a1f9a45276
Use native window.open implementation
2017-03-19 17:41:20 +09:00
Kevin Sawicki
c50b518493
Check toString after loading remote properties
2017-03-17 10:29:07 -07:00
Todd Wolfson
818738ce84
🐛 Add toString support to remote functions
2017-03-17 08:21:37 -07:00
Thiago de Arruda
f6befbe764
Expose lib/renderer/api/remote.js to sandboxed renderer
2017-03-16 14:21:23 -03:00
deepak1556
bd9a9657aa
disable node integration for chrome scheme
2017-03-14 00:26:27 +05:30
deepak1556
a2db14476a
create webui message handler
2017-03-14 00:25:59 +05:30
deepak1556
fdd574cea5
browser: implement pdf renderer as webui
2017-03-14 00:25:59 +05:30
Thiago de Arruda
dda2288541
Remove lib/renderer/api/ipc-renderer-setup.js
...
This file is no longer required since sandboxed renderer directly imports
ipc-renderer.js.
2017-03-09 20:40:32 -03:00
Thiago de Arruda
44bd93589a
Refactor electron exports to keep module list in separate files
2017-03-09 19:08:01 -03:00
Kevin Sawicki
dbe9893d29
Assign Promise.resolve to constant
2017-03-07 12:10:09 -08:00
Kevin Sawicki
79b17c2cd9
Expose TouchBar on remote module
2017-03-03 14:00:39 -08:00
Kevin Sawicki
e8a79cb88d
Don't require browser process module from renderer
...
This can cause issues when it is accessed from the
require cache or module tree since the getters throw
errors when called.
2017-02-28 08:45:39 -08:00
Kevin Sawicki
1d84d83fd4
Forward webview visibility change events from browser process
2017-02-28 08:23:00 -08:00
Kevin Sawicki
7564a9973b
Use const instead of var
2017-02-28 08:23:00 -08:00
Kevin Sawicki
f4717b34e9
Register visibility change listener when attached
2017-02-28 08:23:00 -08:00
deepak1556
403e7681c1
add basic webview zoom specs
2017-02-18 01:34:32 +05:30
Kevin Sawicki
2a18e3f9ea
Remove Buffer global on load
2017-02-14 08:42:34 -08:00
deepak1556
e3fe3cc490
map webframe zoom api to use HostZoomMap
2017-02-12 00:49:17 +05:30
deepak1556
63c0e4cbb1
Add ZoomController to manager zoom changes for webcontents
2017-02-12 00:49:17 +05:30
Greg Nolle
e29b64a18a
modify CertVerifier Class
...
* respond to multiple similar verification requests.
* accept net error result as callback response.
2017-02-08 11:59:43 -08:00
Cheng Zhao
c72438f09f
WebInspector has been split up
2017-02-06 10:34:29 -08:00
Kevin Sawicki
6bcfd0630c
Document implemented APIs at the top
2017-01-16 12:38:16 -08:00
Kevin Sawicki
fbcbfbda6a
Add back BrowserWindowProxy location property
2017-01-16 12:38:16 -08:00
Kevin Sawicki
f3852c57fc
Use empty string for comparison
2017-01-16 12:38:16 -08:00
Kevin Sawicki
2e6d08c652
Remove unneeded this prefix
2017-01-16 12:38:16 -08:00
Kevin Sawicki
bb260343de
Move more functions to outer scope
2017-01-16 12:38:16 -08:00
Kevin Sawicki
3f7b3c4bd7
Implement window overrides in main context
2017-01-16 12:38:16 -08:00
Javan Makhmali
a64bdbd306
Add "context-menu" DOM event to <webview>
2017-01-13 17:04:09 -05:00
Kevin Sawicki
1278e8cebc
Remove unused variable
2016-12-02 13:40:31 -08:00
Kevin Sawicki
635c909aab
Implement window.alert/confirm/close in main process
2016-12-02 13:40:31 -08:00
Kevin Sawicki
f894da13b0
Pass args array instead of arguments object
2016-12-02 13:40:31 -08:00
Kevin Sawicki
af555bd879
Use spread syntax instead of apply
2016-12-01 14:56:00 -08:00
Kevin Sawicki
c8ff67ab75
Use spread syntax instead of function apply
2016-12-01 14:56:00 -08:00
Kevin Sawicki
477ac313ab
Merge pull request #8086 from deepak1556/devtools_remove_workspace_patch
...
override window.confirm in devtools
2016-11-29 13:31:21 -08:00
Kevin Sawicki
72e559458f
Inline buttons and cancelId values
2016-11-29 13:30:28 -08:00
Kevin Sawicki
6f6c5c07f0
Remove unintended returns
2016-11-28 10:56:23 -08:00
Kevin Sawicki
3a29555772
Access URL through webContents directly
2016-11-28 10:56:23 -08:00
deepak1556
3ac9858726
override window.confirm in devtools
2016-11-28 01:08:48 +05:30
Cheng Zhao
bbaab755e3
Merge pull request #8049 from electron/prevent-remove-all-ipc
...
Throw an error when users attempt to remove all listeners from the IPC modules
2016-11-27 14:29:49 +08:00
Kevin Sawicki
9a5df9da41
Expose setVisualZoomLevelLimits on webContents and <web-view>
2016-11-22 08:07:55 -08:00
Samuel Attard
db729b5b52
Throw an error when users attempt to remove all listeners from the IPC modules
2016-11-22 18:30:58 +11:00
Paul Betts
e2649ce7d8
Add new method to set layout-based zoom level limit
2016-11-21 14:59:55 -05:00
Cheng Zhao
3834f0c6a6
Merge pull request #7974 from electron/chrome-runtime-response-callback
...
Implement chrome.runtime.onMessage response callback
2016-11-17 13:01:38 +09:00
Samuel Attard
7c26ec8bd4
Remove semicolon
2016-11-17 14:56:44 +11:00
Kevin Sawicki
5167ccd147
Guard against missing members in setObjectMembers
2016-11-16 07:45:34 -08:00
Birunthan Mohanathas
2986b7bc4a
Allow webview guests to be resized manually
...
This adds the `disableguestresize` property for webviews to prevent the
webview guest from reacting to size changes of the webview element. This
also partially documents the `webContents.setSize` function in order to
manually control the webview guest size.
These two features can be combined to improve resize performance for
e.g. webviews that span the entire window. This greatly reduces the lag
described in #6905 .
2016-11-15 11:00:09 -08:00
Samuel Attard
01005688b6
Implement chrome.runtime.onMessage response callback
2016-11-15 21:30:40 +11:00
Jhen
b86dff45d7
Add support remove / clear for chrome.storage
2016-11-12 02:16:51 +08:00
Kevin Sawicki
6fda4fc45c
Guard against attachedCallback firing while handling detachedCallback
2016-11-07 13:42:36 -08:00
Kevin Sawicki
0485069c7b
Use spread operator
2016-11-07 08:25:01 -08:00
Kevin Sawicki
e4d6aa30a1
Do truthy check in if block
2016-11-07 08:25:01 -08:00
Kevin Sawicki
89a26684e5
Return webContents directly
2016-11-07 08:25:01 -08:00
Kevin Sawicki
0e1c2b0fcb
Use for/of and remove loop variables
2016-11-07 08:25:01 -08:00
Kevin Sawicki
6eab14359c
Use ES6 style class for WebViewImpl
2016-11-07 08:25:01 -08:00
Kevin Sawicki
76f96bd99c
Destructure requires
2016-11-07 08:25:01 -08:00
Kevin Sawicki
48bcad87c2
Use template strings
2016-11-07 08:25:01 -08:00
Kevin Sawicki
712b15286c
Use let/const instead of var
2016-11-07 08:25:01 -08:00
Kevin Sawicki
3053be345b
Remove unneeded returns
2016-11-07 08:25:01 -08:00
Kevin Sawicki
e0afb814aa
Only call browserify when one of sandbox sources change
2016-11-07 08:19:59 -08:00
Samuel Attard
9f18a6e65c
Use ES6 template strings, fix docs and remove _ERROR_ IPC event
2016-11-03 09:33:47 -07:00
Samuel Attard
857e1da6a3
Make executeJavaScript return a Promise so that caught errors can be sent to the caller
2016-11-03 09:33:47 -07:00
Samuel Attard
75b010ce63
Add sync executeJavaScript test
2016-11-03 09:33:47 -07:00
Samuel Attard
124fbdbd74
Allow web frame methods to return async promises
2016-11-03 09:33:47 -07:00
Kevin Sawicki
68c2c9825f
Remove lint warnings
2016-10-25 10:36:43 +09:00
Paul Frazee
f35536bdc5
factor out parse-features-string.js
2016-10-24 20:21:42 -05:00
Paul Frazee
e7962c7ba2
fixes and tests for webview 'webpreferences' attr
2016-10-14 18:04:33 -05:00
Paul Frazee
194b14100e
add the 'webpreferences' attribute to webviews
2016-10-14 17:16:39 -05:00
Michael Vasseur
c811188e22
Updated required code to handle missing additional features for popup windows
2016-10-04 14:38:32 +09:00
Cheng Zhao
458c4dd129
Merge branch 'support-chromium-sandbox' of https://github.com/tarruda/electron into tarruda-support-chromium-sandbox
2016-09-27 20:02:23 +08:00
Thiago de Arruda
0f7652dc85
Move code that defines ipcRenderer methods into another file.
2016-09-27 06:01:46 -03:00
Zeke Sikelianos
56d62ff589
add html doctype
2016-09-22 14:47:20 -07:00
Zeke Sikelianos
62375663ab
add type to webview style tag
2016-09-22 14:34:03 -07:00
Cheng Zhao
e3e450613d
Merge pull request #7157 from Mossop/moveguest
...
Allow moving a webcontents to a different webview
2016-09-20 14:28:42 +09:00
Kevin Sawicki
eef42770c6
Don't load remote properties until they are accessed
2016-09-14 13:29:49 -07:00
Kevin Sawicki
359ab2f9b3
Only set members when members exist
2016-09-14 10:54:23 -07:00
Dave Townsend
313b2faa3c
Add a guestinstance attribute to webviews reflecting their current guest
...
instance ID and allowing moving a guest instance to a new webview.
2016-09-09 10:32:05 -07:00
Cheng Zhao
693ba1375b
Merge pull request #7146 from electron/resolve-empty-url-values
...
Tweak how empty URLs are resolved
2016-09-09 19:58:41 +09:00
Kevin Sawicki
daf1eec5ec
Use === for string comparison
2016-09-08 17:11:10 -07:00
Kevin Sawicki
1dbaf4987e
Don't resolve empty src/preload attribute values
2016-09-08 16:48:30 -07:00
Kevin Sawicki
9829baed46
Open about:blank when window.open is called with no URL
2016-09-08 16:10:21 -07:00
Kevin Sawicki
d476227e16
Remove unneeded return
2016-09-08 10:20:39 -07:00
Kevin Sawicki
902bd0564e
Require Buffer explicitly instead of relying on global
2016-09-08 10:17:06 -07:00
Cheng Zhao
f854b27bfb
Merge pull request #6867 from electron/remote-function-properties
...
Allow accessing remote function properties
2016-08-31 17:28:09 +09:00
Kevin Sawicki
01e69353d5
Don't serialize ArrayBuffer as Array
2016-08-24 15:18:42 -07:00
Kevin Sawicki
ec44a5d198
Add tests for setting remote function properties
2016-08-22 17:07:18 -07:00
Kevin Sawicki
666a668d91
Support remote function keys and property descriptors
2016-08-22 17:07:18 -07:00
Kevin Sawicki
d226b7bc6c
Use Proxy for accessing properties of remote function
2016-08-22 17:07:18 -07:00
Kevin Sawicki
8b38018ab4
Add helper for including function properties
2016-08-22 17:07:17 -07:00
Kevin Sawicki
d333cc5e38
Support remote function properties
2016-08-22 17:07:17 -07:00
Alexey Prokhorov
16f2702495
Apply resolveURL when set a location of a window opened by window.open()
2016-08-16 16:24:49 +05:00
Samuel Attard
5b07e8dd5b
Send isMainFrame as argument to did-navigate-in-page event
2016-08-12 01:27:50 +10:00
Cheng Zhao
8c0a033b6f
Fix lint errors of using __proto__
2016-08-02 21:02:28 +09:00
Cheng Zhao
6e0cde5b24
All native objects have prototype now
2016-08-02 17:12:17 +09:00
Samuel Attard
e4f6083753
Implement asynchronous versions of getZoomFactor and GetZoomLevel on the webContents object
2016-08-02 13:02:55 +10:00
Cheng Zhao
9ddb62c42a
Use Buffer.from instead of deprecated new Buffer
2016-07-25 16:40:22 +09:00
Cheng Zhao
1c9421bc89
Use ArrayBuffer.isView to detect Buffer and ArrayBuffer
2016-07-25 16:39:09 +09:00
haad
fac330fb50
Fix TypedArray check, add check when instanceof doesn't work for TypedArrays.
2016-07-23 12:43:49 +01:00
haad
c717cd9192
🐛 Add support for TypedArrays in IPC.
...
Fixes https://github.com/electron/electron/issues/2104 .
2016-07-22 19:44:19 +01:00
Kevin Sawicki
fa36d2e8c6
Add standard edit items to text context menus
2016-07-12 11:54:45 -07:00
Kevin Sawicki
63b98b1ea0
Use const instead of var
2016-07-12 11:31:40 -07:00
Kevin Sawicki
00f82aaffe
Only check arrays and objects for cycles
2016-07-11 10:39:45 -07:00
Kevin Sawicki
564b0cace5
Maintain visted objects as a stack for cycle detection
2016-07-11 10:33:13 -07:00
Kevin Sawicki
5da0b856f9
Call includes directly on visited array
2016-07-11 10:33:13 -07:00
Kevin Sawicki
2cc2b8a146
Return empty array for circular references
2016-07-11 10:33:04 -07:00
Cheng Zhao
bbfdaf7679
Merge pull request #6355 from electron/webview-capture-page
...
Add <webview>.capturePage([rect,] callback)
2016-07-07 10:09:40 +09:00
Kevin Sawicki
a9b43a0fc9
Use empty string constructor name when missing
2016-07-06 13:06:48 -07:00
Kevin Sawicki
f7b72f0948
Move capturePage to WebContents
2016-07-06 09:21:28 -07:00
Kevin Sawicki
d67dfd09fd
Pass through empty constructor names
2016-07-06 09:18:20 -07:00
Maksim
b444b35215
Update remote.js
2016-07-06 09:11:04 -07:00
Kevin Sawicki
d2d11ce8bd
Invoke callback instead of returning
2016-06-28 13:04:59 -07:00
Ian Ornelas
d6ab353438
Add chrome.storage.local
2016-06-28 07:21:03 -03:00
Jhen
233355ed09
Fix chrome.runtime.sendMessage
...
add a case of not provide extension-id: (message, responseCallback)
2016-06-23 07:40:15 +08:00
gellert
3d010a8988
fixes transformed webview size
2016-06-19 00:41:42 +02:00
Kevin Sawicki
65abaee299
Forward will/did navigate events to extensions
2016-06-16 12:07:59 -07:00
Kevin Sawicki
567622c126
Drop unneeded .js extensions
2016-06-16 09:52:14 -07:00
Kevin Sawicki
3aecb11094
Extract Event clas to own file
2016-06-16 09:51:54 -07:00
Kevin Sawicki
7f9fa92e2d
Add chrome.webNavigation stubs
2016-06-16 09:46:26 -07:00
Cheng Zhao
18a38dbfc1
Fix exception in alert for inavlid parameter
2016-06-14 15:22:01 +09:00
Jessica Lord
c68ca16148
Merge pull request #5974 from electron/chrome-storage-sync
...
Add chrome.storage.sync and chrome.storage.get APIs
2016-06-10 12:20:03 -07:00
Jessica Lord
39e6081a00
🔥 line
2016-06-10 09:59:47 -07:00
Cheng Zhao
4373dc1eac
Merge pull request #5972 from electron/non-writeable-guest-id
...
Make guestId on BrowserWindowProxy non-writeable
2016-06-10 12:02:07 +00:00
Jessica Lord
ede3dbd201
🚿 Lint
2016-06-09 16:39:24 -07:00
Jessica Lord
f121f46a24
Merge branch 'master' into chrome-storage-sync
2016-06-09 16:35:00 -07:00
Jessica Lord
dc10568917
Handle the three get cases
2016-06-09 16:26:42 -07:00
Kevin Sawicki
2efc913222
Remove standard lint warnings
2016-06-09 14:17:54 -07:00
Jessica Lord
41d6ddd588
Add storage file
2016-06-09 14:14:14 -07:00
Kevin Sawicki
01f96fe6af
Default locale to en
2016-06-09 14:00:53 -07:00
Kevin Sawicki
9f64c39f8c
Remove lint warnings
2016-06-09 13:57:08 -07:00
Kevin Sawicki
2367cd574e
Cache extension metadata
2016-06-09 13:57:08 -07:00
Kevin Sawicki
ea9d2dadf8
Add fixme for sync ipc
2016-06-09 13:57:08 -07:00
Kevin Sawicki
d4925e6226
Add initial support for placeholders and substitutions
2016-06-09 13:57:08 -07:00
Kevin Sawicki
d54de73e03
🎨
2016-06-09 13:57:08 -07:00
Kevin Sawicki
84960af793
Add initial chrome.i18n.getMessage API
2016-06-09 13:57:08 -07:00
Kevin Sawicki
2f93735909
Make BrowserWindowProxy guestId non-writeable
2016-06-09 13:41:42 -07:00
Kevin Sawicki
4f0a52628e
Add showDefinitionForSelection to webContents/webview
2016-06-08 10:15:36 -07:00
Kevin Sawicki
cd2041375b
Add missing A in constant name
2016-06-07 16:31:16 -07:00
Kevin Sawicki
ca6e3ed1ef
Add webview support for disabled blink features
2016-06-07 13:49:31 -07:00
Cheng Zhao
3c873736d7
Add update-target-url event
2016-06-07 15:56:19 +09:00
Kevin Sawicki
61ce19ba7e
Set chrome.runtime.id
2016-06-06 14:42:07 -07:00
Cheng Zhao
9f0fc96025
Merge pull request #5711 from electron/extension-code-cleanup
...
Implement partial chrome.* API for devtools extension
2016-05-29 23:29:08 +00:00
Cheng Zhao
de001a9bbf
Use meaningful name for extensionId
2016-05-29 11:57:20 +09:00
Cheng Zhao
ec1944c146
Implement chrome.tab.onCreated/onRemoved APIs
2016-05-29 11:50:14 +09:00
Cheng Zhao
2431d886bf
Current handle sender.tab for background pages
2016-05-29 10:46:48 +09:00
Cheng Zhao
f693b042b5
Fix js lint warnings
2016-05-28 22:46:15 +09:00
Cheng Zhao
30dca2b4e1
Pages in chrome extension should not have node integration
2016-05-28 21:46:53 +09:00
Cheng Zhao
9ed4730cba
Pass sender for chrome.runtime.onMessage
2016-05-28 21:45:23 +09:00
Cheng Zhao
5eb9ed1729
Implement chrome.tabs.sendMessage
2016-05-28 21:35:07 +09:00
Cheng Zhao
62fb4f9820
Implement chrome.runtime.sendMessage
2016-05-28 21:23:43 +09:00
Cheng Zhao
ba315248e0
Use ipcRenderer.sendTo to get rid of routers in main process
2016-05-28 21:13:00 +09:00
Cheng Zhao
ae1f442b02
Add ipcRenderer.sendTo
2016-05-28 20:50:28 +09:00
Cheng Zhao
d55b96fdf5
Clean up the Chrome API implementation code
2016-05-28 20:33:18 +09:00
Cheng Zhao
31628abadc
Implement chrome.tabs.executeScript
2016-05-28 16:41:12 +09:00
Cheng Zhao
db94121360
Implement port.sender
2016-05-28 16:01:16 +09:00
Cheng Zhao
f5b430d9e1
Inject chrome.* to content scripts
2016-05-28 15:37:44 +09:00
Cheng Zhao
d8db695712
Handle port disconnecting
2016-05-28 12:07:08 +09:00