[doc]: fix when to use protocol module
This commit is contained in:
		
					parent
					
						
							
								7006a14031
							
						
					
				
			
			
				commit
				
					
						a360ef7c8d
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue