Merge pull request #9724 from electron/bump-standard-markdown
Bump standard-markdown
This commit is contained in:
commit
7587fc22f1
9 changed files with 6 additions and 9 deletions
|
@ -134,7 +134,7 @@ Windowsでは、ファイルパスを取得するために、 `process.argv` を
|
|||
`url` の `certificate` 検証に失敗したときに発生します。証明書を信頼するために`event.preventDefault()` と `callback(true)`をコールして既定の動作を止める必要があります。
|
||||
|
||||
```javascript
|
||||
session.on('certificate-error', function (event, webContents, url, error, certificate, callback) {
|
||||
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
|
||||
if (url === 'https://github.com') {
|
||||
// Verification logic.
|
||||
event.preventDefault()
|
||||
|
|
|
@ -76,7 +76,7 @@ app.on('ready', function () {
|
|||
|
||||
```javascript
|
||||
protocol.registerBufferProtocol('atom', function (request, callback) {
|
||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
||||
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||
}, function (error) {
|
||||
if (error) console.error('Failed to register protocol')
|
||||
})
|
||||
|
|
|
@ -20,7 +20,6 @@ app.on('ready', function () {
|
|||
appIcon.setToolTip('This is my application.')
|
||||
appIcon.setContextMenu(contextMenu)
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
__プラットフォームの制限:__
|
||||
|
|
|
@ -130,7 +130,7 @@ app.on('ready', () => {
|
|||
const {protocol} = require('electron')
|
||||
|
||||
protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
||||
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||
}, (error) => {
|
||||
if (error) console.error('Failed to register protocol')
|
||||
})
|
||||
|
|
|
@ -131,7 +131,6 @@ app.on('activate', function () {
|
|||
|
||||
// В этот файл Вы можете включить остальной код вашего главного процесса.
|
||||
// Вы также можете разложить его по отдельным файлам и подключить с помощью require.
|
||||
|
||||
```
|
||||
|
||||
Наконец, `index.html`, страница, которую Вы хотите показать:
|
||||
|
|
|
@ -141,7 +141,6 @@ app.on('activate', () => {
|
|||
// Bu sayfada, uygulamanızın spesifik main process kodlarını dahil edebilirsiniz.
|
||||
// Aynı zamanda bu kodları ayrı dosyalar halinde oluştura bilir
|
||||
// ve buraya require yoluyla ekleye bilirsiniz.
|
||||
|
||||
```
|
||||
|
||||
Son olarak `index.html` yani göstermek istediğiniz web sayfası:
|
||||
|
|
|
@ -124,7 +124,7 @@ app.on('ready', () => {
|
|||
const {protocol} = require('electron')
|
||||
|
||||
protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
||||
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||
}, (error) => {
|
||||
if (error) console.error('Failed to register protocol')
|
||||
})
|
||||
|
|
|
@ -137,7 +137,7 @@ Example:
|
|||
const {protocol} = require('electron')
|
||||
|
||||
protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
||||
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||
}, (error) => {
|
||||
if (error) console.error('Failed to register protocol')
|
||||
})
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"electron-typescript-definitions": "^1.2.7",
|
||||
"request": "^2.68.0",
|
||||
"standard": "^8.4.0",
|
||||
"standard-markdown": "^2.1.1"
|
||||
"standard-markdown": "^4.0.0"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
|
|
Loading…
Add table
Reference in a new issue