diff --git a/docs/README.md b/docs/README.md index a2cfbfba4249..5b6edf788b2b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -40,12 +40,14 @@ an issue: * [Adding Features to Your App]() * [Notifications](tutorial/notifications.md) * [Recent Documents](tutorial/desktop-environment-integration.md#recent-documents-windows-mac-os) - * [Progress](tutorial/progress-bar.md) + * [Application Progress](tutorial/progress-bar.md) * [Custom Dock Menu](tutorial/desktop-environment-integration.md#custom-dock-menu-mac-os) * [Custom Windows Taskbar](tutorial/windows-taskbar.md) * [Custom Unity Launcher](tutorial/unity-launcher.md) * [Keyboard Shortcuts](tutorial/keyboard-shortcuts.md) * [Offline/Online Detection](tutorial/online-offline-events.md) + * [Represented File for macOS Windows](tutorial/represented-file.md) + * [Native File Drag & Drop](tutorial/native-file-drag-drop.md) * [Application Accessibility](tutorial/accessibility.md) * [Spectron](tutorial/accessibility.md#spectron) * [Devtron](tutorial/accessibility.md#devtron) diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md index 3735ff28bec6..5630068d871a 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -17,6 +17,6 @@ If you just came here to learn about Electron, check out the [official guides][readme]. [first-app]: ./first-app.md -[processes]: ./electron-apis.md#main-and-renderer-processes +[processes]: ./application-architecture.md#main-and-renderer-processes [readme]: ../README.md diff --git a/docs/tutorial/represented-file.md b/docs/tutorial/represented-file.md new file mode 100644 index 000000000000..a7370229a106 --- /dev/null +++ b/docs/tutorial/represented-file.md @@ -0,0 +1,28 @@ +# Represented File for macOS Windows + +On macOS a window can set its represented file, so the file's icon can show in +the title bar and when users Command-Click or Control-Click on the title a path +popup will show. + +You can also set the edited state of a window so that the file icon can indicate +whether the document in this window has been modified. + +__Represented file popup menu:__ + +![Represented File][represented-image] + +To set the represented file of window, you can use the +[BrowserWindow.setRepresentedFilename][setrepresentedfilename] and +[BrowserWindow.setDocumentEdited][setdocumentedited] APIs: + +```javascript +const { BrowserWindow } = require('electron') + +const win = new BrowserWindow() +win.setRepresentedFilename('/etc/passwd') +win.setDocumentEdited(true) +``` + +[represented-image]: https://cloud.githubusercontent.com/assets/639601/5082061/670a949a-6f14-11e4-987a-9aaa04b23c1d.png +[setrepresentedfilename]: ../api/browser-window.md#winsetrepresentedfilenamefilename-macos +[setdocumentedited]: ../api/browser-window.md#winsetdocumenteditededited-macos diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index aba72f29aea5..04fa64d43f36 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -491,16 +491,16 @@ const mainWindow = new BrowserWindow() _Recommendation is Electron's default_ -If you are using [`WebViews`](web-view), you might need the pages and scripts +If you are using [`WebViews`][web-view], you might need the pages and scripts loaded in your `` tag to open new windows. The `allowpopups` attribute -enables them to create new [`BrowserWindows`](browser-window) using the +enables them to create new [`BrowserWindows`][browser-window] using the `window.open()` method. `WebViews` are otherwise not allowed to create new windows. ### Why? If you do not need popups, you are better off not allowing the creation of -new [`BrowserWindows`](browser-window) by default. This follows the principle +new [`BrowserWindows`][browser-window] by default. This follows the principle of minimally required access: Don't let a website create new popups unless you know it needs that feature. @@ -564,4 +564,4 @@ is to display a website, a browser will be a more secure option. [browser-window]: ../api/browser-window.md [browser-view]: ../api/browser-view.md -[web-view]: ../api/web-view +[web-view]: ../api/web-view.md diff --git a/docs/tutorial/windows-store-guide.md b/docs/tutorial/windows-store-guide.md index 436549638c1f..5068d85d0341 100644 --- a/docs/tutorial/windows-store-guide.md +++ b/docs/tutorial/windows-store-guide.md @@ -151,7 +151,7 @@ You will receive two files: `DesktopAppConverter.zip` and `BaseImage-14316.wim`. Once installation succeeded, you can move on to compiling your Electron app. [windows-sdk]: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk -[app-converter]: https://www.microsoft.com/en-us/download/details.aspx?id=51691 +[app-converter]: https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter [add-appxpackage]: https://technet.microsoft.com/en-us/library/hh856048.aspx [electron-packager]: https://github.com/electron-userland/electron-packager [electron-windows-store]: https://github.com/catalystcode/electron-windows-store