File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,20 @@ export class Tab extends StatefulClass {
7070 this . pos = 0 ;
7171
7272 addHistoryListeners ( frame , this ) ;
73+ let injected = false ;
7374 frame . addEventListener ( "contextInit" , ( ctx ) => {
7475 injectContextMenu ( ctx . client , this ) ;
7576
7677 // make sure it's top level, ctxInit calls for all frames too
7778 if ( ctx . window == frame . frame . contentWindow ) {
7879 injectTitleWatcher ( ctx . client , this ) ;
7980 injectHistoryEmulation ( ctx . client , this ) ;
80- // injectDevtools(ctx.client, this);
81+
82+ use ( this . devtoolsOpen ) . listen ( ( open ) => {
83+ if ( ! open || injected ) return ;
84+ injected = true ;
85+ injectDevtools ( ctx . client , this ) ;
86+ } ) ;
8187 }
8288 } ) ;
8389
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ Shell.style = css`
9898 display : flex;
9999 }
100100
101+ .devtoolsframecontainer {
102+ width : 100% ;
103+ }
104+
101105 .mainframecontainer {
102106 display : flex;
103107 flex : 1 ;
You can’t perform that action at this time.
0 commit comments