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: es6ify 'Breaking Changes' and 'File' API pages #15507

Merged
merged 3 commits into from Dec 5, 2018
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
12 changes: 6 additions & 6 deletions docs/api/breaking-changes.md
Expand Up @@ -30,13 +30,13 @@ The following list includes the breaking API changes planned for Electron 4.0.

```js
// Deprecated
app.makeSingleInstance(function (argv, cwd) {

app.makeSingleInstance((argv, cwd) => {
/* ... */
})
// Replace with
app.requestSingleInstanceLock()
app.on('second-instance', function (event, argv, cwd) {

app.on('second-instance', (event, argv, cwd) => {
/* ... */
})
```

Expand Down Expand Up @@ -212,11 +212,11 @@ screen.getPrimaryDisplay().workArea

```js
// Deprecated
ses.setCertificateVerifyProc(function (hostname, certificate, callback) {
ses.setCertificateVerifyProc((hostname, certificate, callback) => {
callback(true)
})
// Replace with
ses.setCertificateVerifyProc(function (request, callback) {
ses.setCertificateVerifyProc((request, callback) => {
callback(0)
})
```
Expand Down
8 changes: 4 additions & 4 deletions docs/api/file-object.md
Expand Up @@ -15,15 +15,15 @@ Example of getting a real path from a dragged-onto-the-app file:
</div>

<script>
document.addEventListener('drop', function (e) {
document.addEventListener('drop', (e) => {
e.preventDefault();
e.stopPropagation();
for (let f of e.dataTransfer.files) {

for (const f of e.dataTransfer.files) {
console.log('File(s) you dragged here: ', f.path)
}
});
document.addEventListener('dragover', function (e) {
document.addEventListener('dragover', (e) => {
e.preventDefault();
e.stopPropagation();
});
Expand Down