remove screen.getMenuBarHeight() deprecation
This commit is contained in:
		
					parent
					
						
							
								cc30f4c4fd
							
						
					
				
			
			
				commit
				
					
						72c63a10ee
					
				
			
		
					 6 changed files with 0 additions and 48 deletions
				
			
		|  | @ -1,17 +1,8 @@ | |||
| const {EventEmitter} = require('events') | ||||
| const {deprecate} = require('electron') | ||||
| const {screen, Screen} = process.atomBinding('screen') | ||||
| 
 | ||||
| // Screen is an EventEmitter.
 | ||||
| Object.setPrototypeOf(Screen.prototype, EventEmitter.prototype) | ||||
| EventEmitter.call(screen) | ||||
| 
 | ||||
| const nativeFn = screen.getMenuBarHeight | ||||
| screen.getMenuBarHeight = function () { | ||||
|   if (!process.noDeprecations) { | ||||
|     deprecate.warn('screen.getMenuBarHeight', 'screen.getPrimaryDisplay().workArea') | ||||
|   } | ||||
|   return nativeFn.call(this) | ||||
| } | ||||
| 
 | ||||
| module.exports = screen | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Shelley Vohr
				Shelley Vohr