Show last panel by id
This commit is contained in:
		
					parent
					
						
							
								13cfc2d2a0
							
						
					
				
			
			
				commit
				
					
						f95c46d987
					
				
			
		
					 1 changed files with 5 additions and 7 deletions
				
			
		| 
						 | 
					@ -836,16 +836,14 @@ describe('browser-window module', function () {
 | 
				
			||||||
        w.webContents.on('devtools-opened', function () {
 | 
					        w.webContents.on('devtools-opened', function () {
 | 
				
			||||||
          var inputEventIntervalId = setInterval(function () {
 | 
					          var inputEventIntervalId = setInterval(function () {
 | 
				
			||||||
            if (w && w.devToolsWebContents) {
 | 
					            if (w && w.devToolsWebContents) {
 | 
				
			||||||
              // Switch panels until the custom one is selected and loads
 | 
					              w.devToolsWebContents.executeJavaScript('(' + (function () {
 | 
				
			||||||
              w.devToolsWebContents.sendInputEvent({
 | 
					                var lastPanelId = WebInspector.inspectorView._tabbedPane._tabs.peekLast().id
 | 
				
			||||||
                type: 'keyDown',
 | 
					                WebInspector.inspectorView.showPanel(lastPanelId);
 | 
				
			||||||
                keyCode:'[',
 | 
					              }).toString() + ')()')
 | 
				
			||||||
                modifiers: process.platform === 'darwin' ? ['meta'] : ['control']
 | 
					 | 
				
			||||||
              })
 | 
					 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              clearInterval(inputEventIntervalId)
 | 
					              clearInterval(inputEventIntervalId)
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }, 200)
 | 
					          }, 100)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        w.loadURL('about:blank')
 | 
					        w.loadURL('about:blank')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue