@@ -20,7 +20,7 @@ export type SerializedTab = {
2020 history : SerializedHistory ;
2121} ;
2222
23- let id = 0 ;
23+ let id = 100 ;
2424export class Tab extends StatefulClass {
2525 id : number ;
2626 title : string | null ;
@@ -54,6 +54,9 @@ export class Tab extends StatefulClass {
5454 this . title = null ;
5555 this . internalpage = null ;
5656
57+ const frame = scramjet . createFrame ( ) ;
58+ this . frame = frame ;
59+
5760 this . history = new History ( this ) ;
5861 this . history . push ( this . url , undefined ) ;
5962
@@ -65,7 +68,6 @@ export class Tab extends StatefulClass {
6568 this . width = 0 ;
6669 this . pos = 0 ;
6770
68- const frame = scramjet . createFrame ( ) ;
6971 addHistoryListeners ( frame , this ) ;
7072 frame . addEventListener ( "contextInit" , ( ctx ) => {
7173 injectContextMenu ( ctx . client , this ) ;
@@ -77,7 +79,6 @@ export class Tab extends StatefulClass {
7779 }
7880 } ) ;
7981
80- this . frame = frame ;
8182 this . devtoolsFrame = scramjet . createFrame ( ) ;
8283 }
8384
@@ -89,7 +90,7 @@ export class Tab extends StatefulClass {
8990 } ;
9091 }
9192 deserialize ( de : SerializedTab ) {
92- if ( id >= de . id ) id = de . id + 1 ;
93+ if ( de . id >= id ) id = de . id + 1 ;
9394 this . id = de . id ;
9495 this . title = de . title ;
9596 this . history . deserialize ( de . history ) ;
0 commit comments