From: deepak1556 Date: Tue, 24 Mar 2015 11:56:12 +0000 (+0530) Subject: [doc]: fix when to use protocol module X-Git-Tag: v0.22.3~32^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a360ef7c8d42e38d930d6cdfc2566d5c4680c2d1;p=electron.git [doc]: fix when to use protocol module --- diff --git a/docs/api/protocol.md b/docs/api/protocol.md index 0a80397e..38a24d38 100644 --- a/docs/api/protocol.md +++ b/docs/api/protocol.md @@ -10,7 +10,7 @@ An example of implementing a protocol that has the same effect with the var app = require('app'), path = require('path'); -app.on('will-finish-launching', function() { +app.on('ready', function() { var protocol = require('protocol'); protocol.registerProtocol('atom', function(request) { var url = request.url.substr(7) @@ -19,7 +19,7 @@ app.on('will-finish-launching', function() { }); ``` -**Note:** This module can only be used after the `will-finish-launching` event +**Note:** This module can only be used after the `ready` event was emitted. ## protocol.registerProtocol(scheme, handler)