docs: move protocol-ns to protocol.md (#23883)
* docs: move protocol-ns to protocol.md * chore: fix up tests and implement missing pieces required for tests
This commit is contained in:
parent
edc5050a2e
commit
d3fa5ed1e8
13 changed files with 285 additions and 733 deletions
|
@ -897,13 +897,9 @@ app.whenReady().then(() => {
|
|||
callback({ url: request.url, method: request.method })
|
||||
})
|
||||
|
||||
protocol.unregisterProtocol('atom', (error) => {
|
||||
console.log(error ? error.message : 'ok')
|
||||
})
|
||||
protocol.unregisterProtocol('atom')
|
||||
|
||||
protocol.isProtocolHandled('atom').then(handled => {
|
||||
console.log(handled)
|
||||
})
|
||||
const registered: boolean = protocol.isProtocolRegistered('atom')
|
||||
})
|
||||
|
||||
// tray
|
||||
|
@ -1195,10 +1191,6 @@ app.whenReady().then(function () {
|
|||
protocol.registerFileProtocol('atom', function (request, callback) {
|
||||
const url = request.url.substr(7)
|
||||
callback(path.normalize(__dirname + '/' + url))
|
||||
}, function (error) {
|
||||
if (error) {
|
||||
console.error('Failed to register protocol')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue