Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: uniformize module API doc format #28920

Merged
merged 1 commit into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ These individual tutorials expand on topics discussed in the guide above.
* [ipcMain](api/ipc-main.md)
* [Menu](api/menu.md)
* [MenuItem](api/menu-item.md)
* [MessageChannelMain](api/message-channel-main.md)
* [MessagePortMain](api/message-port-main.md)
* [net](api/net.md)
* [netLog](api/net-log.md)
* [nativeTheme](api/native-theme.md)
Expand All @@ -135,6 +137,7 @@ These individual tutorials expand on topics discussed in the guide above.
* [protocol](api/protocol.md)
* [screen](api/screen.md)
* [session](api/session.md)
* [ShareMenu](api/share-menu.md)
* [systemPreferences](api/system-preferences.md)
* [TouchBar](api/touch-bar.md)
* [Tray](api/tray.md)
Expand Down
12 changes: 7 additions & 5 deletions docs/api/browser-view.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## Class: BrowserView

> Create and control views.

Process: [Main](../glossary.md#main-process)
# BrowserView

A `BrowserView` can be used to embed additional web content into a
[`BrowserWindow`](browser-window.md). It is like a child window, except that it is positioned
relative to its owning window. It is meant to be an alternative to the
`webview` tag.

## Class: BrowserView

> Create and control views.

Process: [Main](../glossary.md#main-process)

### Example

```javascript
Expand Down
2 changes: 2 additions & 0 deletions docs/api/menu.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Menu

## Class: Menu

> Create native application menus and context menus.
Expand Down
3 changes: 3 additions & 0 deletions docs/api/message-channel-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ channel messaging.

## Class: MessageChannelMain

> Channel interface for channel messaging in the main process.

Process: [Main](../glossary.md#main-process)

Example:

```js
// Main process
const { MessageChannelMain } = require('electron')
const { port1, port2 } = new MessageChannelMain()
w.webContents.postMessage('port', null, [port2])
port1.postMessage({ some: 'message' })
Expand Down
2 changes: 2 additions & 0 deletions docs/api/message-port-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ channel messaging.

## Class: MessagePortMain

> Port interface for channel messaging in the main process.

Process: [Main](../glossary.md#main-process)

### Instance Methods
Expand Down
12 changes: 7 additions & 5 deletions docs/api/share-menu.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
## Class: ShareMenu

> Create share menu on macOS.

Process: [Main](../glossary.md#main-process)
# ShareMenu

The `ShareMenu` class creates [Share Menu][share-menu] on macOS, which can be
used to share information from the current context to apps, social media
Expand All @@ -11,6 +7,12 @@ accounts, and other services.
For including the share menu as a submenu of other menus, please use the
`shareMenu` role of [`MenuItem`](menu-item.md).

## Class: ShareMenu

> Create share menu on macOS.

Process: [Main](../glossary.md#main-process)

### `new ShareMenu(sharingItem)`

* `sharingItem` SharingItem - The item to share.
Expand Down
2 changes: 2 additions & 0 deletions docs/api/touch-bar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# TouchBar

## Class: TouchBar

> Create TouchBar layouts for native macOS applications
Expand Down
2 changes: 2 additions & 0 deletions docs/api/tray.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Tray

## Class: Tray

> Add icons and context menus to the system's notification area.
Expand Down