Commit graph

624 commits

Author SHA1 Message Date
Shelley Vohr
3395a1d4db
doc: improve EventEmitter md formatting (#19345) 2019-07-22 08:20:43 -07:00
Jeremy Apthorp
70857e9a5d test: move more BrowserWindow specs (#19290)
* test: move more BrowserWindow specs

* use async instead of setTimeout for cleaner code
2019-07-16 16:37:17 -07:00
Jeremy Apthorp
27599a851f test: move some BrowserWindow specs to the main process (#19182)
* test: move some BrowserWindow specs to the main process

* uncomment cross-site test

* move more tests

* re-enable, refactor and move visibilitychange specs

* move new-window event tests and re-enable them on mac

* move max/minimize event tests

* move modal tests

* move beginFrameSubscription tests

* move savePage test

* move BrowserWindow options argument is optional test

* move restore, unmaximize, fullscreen tests

* move parent window tests

* don't wait for show event on windows (#8664)

* add debugging logs to fullscreen tests

* more debugging on windows

* explicitly destroy browserviews to prevent crash during gc

* only await show on darwin

* more event timing fixes

* disable max/minimize event tests on linux, since they're broken on CI
2019-07-15 21:13:32 -07:00
Shelley Vohr
50f4977048
docs: differentiate static/instance class props (#19196) 2019-07-15 10:15:32 -07:00
Shelley Vohr
75a020e0ac
feat: expose new vibrancy types (#19073) 2019-07-11 14:10:45 -05:00
Julien Isorce
8b31953d40 feat: Can a window always on top but behind the taskbar on Win32 (#18982)
For now it only adds the ability to place the window below
the task bar while still being always on top.
Previous behaviour was always showing the window above the task
bar when top is true. We keep this default behaviour, i.e. when
the 'level' parameter is omitted.

https://github.com/electron/electron/issues/18933

Notes: Can set a window always on top but behind the taskbar on Windows
2019-07-10 09:40:11 -05:00
Jeremy Apthorp
c3ae476deb
test: move some browser window specs to the main process (#19089) 2019-07-08 15:44:37 -07:00
Julien Isorce
09c3277b42 feat: Implement BrowserWindow.setFocusable on macOS (#19033)
It was not implemented on Mac despite being available as a constructor
option. Implementation already exists on Windows. Linux case can be
separately.

https://github.com/electron/electron/issues/19032

Notes: Implemented BrowserWindow.setFocusable on macOS.
2019-07-08 11:34:18 +09:00
Shelley Vohr
43b4a3ae6a
chore: deprecate some NSVisualEffectMaterial types (#19072) 2019-07-03 14:56:03 -07:00
Alexandre Lacheze
2b3a256647 docs: precise that node integration is enabled in natively opened window if nodeIntegrationInSubFrames is true (#18156) 2019-06-25 21:03:23 -07:00
Charles Kerr
792f6b246c
docs: fix spelling and grammar errors (#18910) 2019-06-21 16:19:21 -05:00
Milan Burda
4575a4aae3 Revert "feat: only allow bundled preload scripts (#17308)" (#18091)
This reverts commit 8cf15cc931.
2019-06-20 08:39:12 +09:00
Shelley Vohr
a0b1f4fe0b
refactor: convert browser window state fns to props (#18618) 2019-06-04 22:44:16 -07:00
Samuel Attard
f80601da16
docs: ensure that optionality matches between documented params and signatures (#18613)
* docs: ensure that optionality matches between documented params and signatures

* docs: ensure that all optional declarations are lower case

* chore: fix broken link
2019-06-04 14:03:24 -07:00
Shelley Vohr
52c76d737a
refactor: make autoHideMenuBar a property on BrowserWindows (#18555) 2019-06-03 09:09:47 -07:00
Lucas Gabriel Schneider
286fdaa53c fix: docs/api/browser-window.md: fix typo (#18367) 2019-05-21 15:42:27 +09:00
Milan Burda
76783e2a90 fix: 'page-title-updated' event forwarding + documentation (#18270) 2019-05-16 12:33:16 +03:00
Samuel Attard
a96b6e2c96 build: move to the new docs parser (#18103)
* build: move to the new docs parser

* chore: remove the bad getTitle param doc

* build: update parser/ts gen deps + fix some docs issues highlighted by GH desktop

* chore: apply suggestions from code review

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

* chore: update docs for accidentally removed things

* chore: update docs/api/command-line.md

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
2019-05-06 08:29:01 -07: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
Shelley Vohr
d87b3ead76 chore: remove promisification deprecation callbacks (#17907)
* chore: remove promisification deprecation callbacks

* update docs

* fix smoke test

* fix executejs issue

* cleanup leftovers

* fix webContents.executeJavaScript tests

* cleanup WebContents.prototype.takeHeapSnapshot

* fix "sets arbitrary webContents as devtools" test

* fix executeJavaScriptInFrame related tests
2019-04-30 07:08:32 -07:00
Samuel Attard
f901170a4f
docs: fix doc linter warnings (#17818) 2019-04-16 19:03:17 -04:00
Tyler Dennis
5b696491db docs: remove webaudio doc from browserwindow options (#17633) 2019-04-02 13:46:45 -07:00
Milan Burda
8cf15cc931 feat: only allow bundled preload scripts (#17308) 2019-03-28 11:38:51 +01:00
Shelley Vohr
4e57a732a8
feat: allow windows to be excluded from the windows menu (#17404)
* feat: allow windows to be excluded from the windows menu

* excludedfromWindowsMenu => excludedFromShownWindowsMenu

* implement no-op for win & linux
2019-03-27 08:10:23 -04:00
Shelley Vohr
879462af4b
docs: document modernization initiative more clearly (#17376)
* docs: document modernization initiative more clearly
2019-03-19 10:31:45 -07:00
Samuel Maddock
ac88b3ead5 feat: add 'disableHtmlFullscreenWindowResize' option to webPreferences (#17203)
This option allows users to prevent the window from resizing when the HTML5 FullScreen API is used.
2019-03-07 15:29:37 -08:00
deepak1556
1b982e200a Autoplay: remove cross-origin autoplay policy from //chrome and //content.
https://chromium-review.googlesource.com/c/chromium/src/+/1362225
2019-02-14 23:59:24 +05:30
Julien Isorce
27bd47a333 feat: implement BrowserWindow.moveTop on X11 (#16629)
It was implemented on Mac and Win but not on X11.
Tested on Ubuntu 16.04 and 18.04.

Also added a unit test in spec/api-browser-window-spec.js.
This test BrowserWindow.moveTop verifies that calling moveTop
on a window does not give the focus to this window.

notes: BrowserWindow.moveTop is now available on Linux/x11

https://github.com/electron/electron/issues/12516
2019-02-07 12:48:19 -08:00
Shelley Vohr
c8c1be7ae5
feat: add window removeMenu() method (#16570)
* feat: add window removeMenu() method

* chore: remove original method from docs and code

* retain backwards compatibility
2019-01-31 10:58:23 -08:00
Samuel Attard
f3e30c7ae3
Merge remote-tracking branch 'origin/chromium-upgrade/72' 2019-01-22 12:01:18 -08:00
Samuel Attard
0b85fb7ea2
Revert "feat: upgrade to Chromium 72.0.3626.52 (#16334)"
This reverts commit 1918e76913.
2019-01-22 12:01:04 -08:00
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
Jeremy Apthorp
1918e76913 feat: upgrade to Chromium 72.0.3626.52 (#16334) 2019-01-22 10:39:32 -08:00
Jeremy Apthorp
6d4480ea6b feat: allow setting autoplayPolicy in webPreferences (#16396) 2019-01-22 10:32:06 -08:00
Milan Burda
fade3eb679 chore: make "nodeIntegration" and "webviewTag" default to false (#16235) 2019-01-07 22:19:27 +03:00
Kilian Valkhof
21d1849723 Update browser-window.md with alpha hex formatting (#16269)
HEX with alpha can be #RRGGBBAA or #AARRGGBB. In Electron it's the latter. It's nice to explicitly state that, so others wont have to try twice like me :).
2019-01-04 10:33:12 -08:00
Vladimir
5ae3d1a1b2 feat: add multi BrowserView support to BrowserWindow (#16148)
* feat: add multi BrowserView support to BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

* fix: for lint and osx compile errors

* fix: lint error in test code

* feat: add multi BrowserView support to BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

* fix: for lint and osx compile errors

* fix: lint error in test code

* fix: method to be accessible on mac api impl

* fix: missed function declarations for mac impl

* fix: use base class reset function
2018-12-22 10:49:26 +09:00
popod
f6081b18b6 docs: Improve the doc about BrowserWindow title property (#16086)
* Improve the doc about BrowserWindow title property

* Update docs/api/browser-window.md

Co-Authored-By: popod <popod@me.com>
2018-12-17 13:16:24 -07:00
Michelle Tilley
d6d245d0c3 docs: contextIsolation is no longer experimental (#16043) 2018-12-13 11:21:16 -05:00
Simone Cattaneo
649633bbb7 fix: make 'setParentWindow' compatible under Windows (#15775) 2018-12-12 16:05:16 -08:00
Shelley Vohr
45a937df0a fix: incorrect view ordering for customButtonsOnHover (#15564) 2018-12-10 11:05:30 -08:00
Jeremy Apthorp
442c1b22e3
feat: webContents.loadURL returns a promise (#15855) 2018-12-06 12:16:19 -08:00
Saswat Bhattacharya
d243a45173 feat: implement 'app-command' events for browser history navigation keys on Linux (#15441)
* Added mouse forward/back button support on Linux

* Added browser history navigation action bindings for Windows, Mac, and Linux keyboard

* Removed new `history-action` event and modified `app-command` to execute on such events

* Removed attempt at macOS support and added constants

* Clarified app-command documentation

* Reverted 'app-command' description change

* Format code
2018-12-05 09:35:59 -08:00
Shelley Vohr
41c2685204
feat: promisify win.capturePage() (#15743)
* feat: promisify win.capturePage

* mark optional arg correctly

* Add to breaking changes doc

* properly deprecate win.capturePage

* remove change from api-contract

* document both callback and promise versions

* address docs feedback

* update promisification progress doc
2018-11-27 23:50:53 -05:00
Shelley Vohr
c06f023313
feat: allow partial setting of window bounds (#15677)
Extend the existing win.setBounds functionality by allowing developers to partially update bounds without being forced to pass in all four bounds values. No existing functionality is altere
2018-11-12 15:31:14 -05:00
Cheng Zhao
2f3a8ecd42
fix: child window with nativeWindowOpen should disable node integration (#15213)
* fix: child window with nativeWindowOpen should disable node integration

* Revert "fix: do not enable node integration in child window if not enabled (#15076)"

This reverts commit 0252d7686c.

This patch is not needed anymore since we are force disabling node integration
for child windows.
2018-10-25 15:31:07 +09:00
Milan Burda
d3efc52745 feat: add webPreferences.enableRemoteModule option (#13028) 2018-10-13 20:50:07 +03:00
Samuel Attard
6b621e203c fix: use valid markdown syntax in browser-window.md to fix docs linter 2018-10-10 11:01:05 +11:00
Jeremy Apthorp
373ffa9fee docs: document BrowserWindow.setBackgroundColor 2018-10-09 14:39:39 -07:00
Troy
d678d9ee75 fix: Check minSize constraints before resizing (#14931)
* Inital setSize check

* Only resize if above minimum size constraints

* lint

* Resize to min if size is changed

* Remove unneeded if statement

* chore: remove trailing whitespace

* Add note about setSize method in docs
2018-10-09 12:08:15 -05:00