Commit graph

22 commits

Author SHA1 Message Date
Cheng Zhao
cb6a1e2c5e
fix: set default menu in will-finish-launching event (#23214) 2020-04-23 10:51:31 -07:00
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Samuel Attard
aa15a2cc03
build: update typescript and webpack (#22776) 2020-03-19 16:55:49 -07:00
Jeremy Apthorp
232ca8af39
refactor: EventEmitters without gin_helper (#22726) 2020-03-18 12:57:08 -07:00
Shelley Vohr
5e7c594691
fix: no-arg console.log is undefined (#22165) 2020-02-12 09:25:11 -08:00
Charles Kerr
c83f836faf
refactor: prefer using app.whenReady() (#21972)
* docs: add references to app.whenReady() in isReady

* refactor: prefer app.whenReady()

In the docs, specs, and lib, replace instances of `app.once('ready')`
(seen occasionally) and `app.on('ready')` (extremely common) with
`app.whenReady()`.

It's better to encourage users to use whenReady():
1. it handles the edge case of registering for 'ready' after it's fired
2. it avoids the minor wart of leaving an active listener alive for
an event that wll never fire again
2020-02-03 22:43:22 +00:00
Jeremy Apthorp
acb5b75057
chore: [extensions] support old APIs when enable_electron_extensions = true (#21812) 2020-01-21 09:42:55 -08:00
Cheng Zhao
3cb0ed306b fix: hiding window menu should work on startup (#21436)
* fix: menu visibility should not be overwritten on startup

* fix: removing menu for window without global menubar

* test: setMenu tests are not for mac
2019-12-09 11:17:36 -08:00
Milan Burda
11cd0db86b build: add enable_remote_module build flag (#19821) 2019-09-18 09:52:06 -07:00
Jeremy Apthorp
c71cdce0b7
chore: disable JS impl when //extensions support is on (#19512) 2019-07-31 14:25:41 -07:00
Samuel Attard
24b3d66767
refactor: remove electron.asar and embed JS in binary (#18577)
* refactor: remove electron.asar and embed JS in binary

* chore: update DEPS to merged node sha

* chore: remove unneeded eslint ignore
2019-06-03 17:03:59 -07:00
Samuel Attard
449d2752f2
refactor: lazy load V8 module in browser/init (#18575) 2019-06-03 01:03:33 -07:00
Samuel Attard
bc527f6b51
refactor: bundle the browser and renderer process electron code (#18553)
* refactor: bundle the browser and renderer process electron code

* Bundles browser/init and renderer/init
  * Improves load performance of main process by ~40%
  * Improves load performance of renderer process by ~30%
* Prevents users from importing our "requiring" our internal logic such
as ipc-main-internal.  This makes those message buses safer as they are
less accessible, there is still some more work to be done though to lock
down those buses completely.
* The electron.asar file now only contains 2 files, as a future
improvement maybe we can use atom_natives to ship these two files
embedded in the binary
* This also removes our dependency on browserify which had some strange
edge cases that caused us to have to hack around require-order and
stopped us using certain ES6/7 features we should have been able to use
(async / await in some files in the sandboxed renderer init script)

TLDR: Things are faster and better :)

* fix: I really do not want to talk about it

* chore: add performance improvements from debugging

* fix: resolve the provided path so webpack thinks it is absolute

* chore: fixup per PR review

* fix: use webpacks ProvidePlugin to keep global, process and Buffer alive after deletion from global scope for use in internal code

* fix: bundle worker/init as well to make node-in-workers work

* chore: update wording as per feedback

* chore: make the timers hack work when yarn is not used
2019-06-02 13:03:03 -07:00
Nitish Sakhawalkar
cf5224140b Chrome changed the devtools url
chrome-devtools:// to devtools://
28b21a67f0
2019-05-17 16:16:25 -07:00
Milan Burda
6f5c850d60 refactor: add emitCustomEvent() helper (#17960) 2019-05-01 09:07:57 -04:00
Shelley Vohr
8d83518f9a
refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
2019-04-30 13:55:33 -07:00
Samuel Attard
b7b9efa875
fix: handle remote-debugging-port=0 correctly (#17800)
By default the Chromedriver will send remote-debugging-port=0 to let the
browser choose a free port to listen on.  The chosen port is written to
a known file in the user data dir that is passed to the app through the
CLI.

This PR does two things.

1. Correctly passes the USER_DATA_DIR to the remote debugging server so
it knows where to write the file
2. Adds support for --user-data-dir as we did not support that CLI
argument and Chromedriver relies on being able to tell the "browser"
where to write this file.

Fixes #17354
2019-04-16 14:22:51 -04:00
Shelley Vohr
38d75010c7
chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
ZYSzys
a40d826b11 chore: remove unused catch bindings (#16121) 2019-02-21 09:26:07 +00:00
Samuel Attard
01c442de64 refactor: convert more files to typescript (#16820) 2019-02-12 04:22:33 -10:00
Samuel Attard
db11b9b13b
fix: restore accidentally removed chrome-extension require (#16819) 2019-02-07 12:38:57 -08:00
Samuel Attard
26df9992cf
build: use typescript for internal Electron JS code (#16441) 2019-02-06 10:27:20 -08:00
Renamed from lib/browser/init.js (Browse further)