@@ -979,21 +979,21 @@ export class OAuthService extends AuthConfig implements OnDestroy {
979
979
) ;
980
980
}
981
981
982
- if ( typeof document === 'undefined' ) {
982
+ if ( typeof this . document === 'undefined' ) {
983
983
throw new Error ( 'silent refresh is not supported on this platform' ) ;
984
984
}
985
985
986
- const existingIframe = document . getElementById (
986
+ const existingIframe = this . document . getElementById (
987
987
this . silentRefreshIFrameName
988
988
) ;
989
989
990
990
if ( existingIframe ) {
991
- document . body . removeChild ( existingIframe ) ;
991
+ this . document . body . removeChild ( existingIframe ) ;
992
992
}
993
993
994
994
this . silentRefreshSubject = claims [ 'sub' ] ;
995
995
996
- const iframe = document . createElement ( 'iframe' ) ;
996
+ const iframe = this . document . createElement ( 'iframe' ) ;
997
997
iframe . id = this . silentRefreshIFrameName ;
998
998
999
999
this . setupSilentRefreshEventListener ( ) ;
@@ -1005,7 +1005,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1005
1005
if ( ! this . silentRefreshShowIFrame ) {
1006
1006
iframe . style [ 'display' ] = 'none' ;
1007
1007
}
1008
- document . body . appendChild ( iframe ) ;
1008
+ this . document . body . appendChild ( iframe ) ;
1009
1009
} ) ;
1010
1010
1011
1011
const errors = this . events . pipe (
@@ -1177,7 +1177,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1177
1177
) ;
1178
1178
return false ;
1179
1179
}
1180
- if ( typeof document === 'undefined' ) {
1180
+ if ( typeof this . document === 'undefined' ) {
1181
1181
return false ;
1182
1182
}
1183
1183
@@ -1299,20 +1299,20 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1299
1299
return ;
1300
1300
}
1301
1301
1302
- const existingIframe = document . getElementById ( this . sessionCheckIFrameName ) ;
1302
+ const existingIframe = this . document . getElementById ( this . sessionCheckIFrameName ) ;
1303
1303
if ( existingIframe ) {
1304
- document . body . removeChild ( existingIframe ) ;
1304
+ this . document . body . removeChild ( existingIframe ) ;
1305
1305
}
1306
1306
1307
- const iframe = document . createElement ( 'iframe' ) ;
1307
+ const iframe = this . document . createElement ( 'iframe' ) ;
1308
1308
iframe . id = this . sessionCheckIFrameName ;
1309
1309
1310
1310
this . setupSessionCheckEventListener ( ) ;
1311
1311
1312
1312
const url = this . sessionCheckIFrameUrl ;
1313
1313
iframe . setAttribute ( 'src' , url ) ;
1314
1314
iframe . style . display = 'none' ;
1315
- document . body . appendChild ( iframe ) ;
1315
+ this . document . body . appendChild ( iframe ) ;
1316
1316
1317
1317
this . startSessionCheckTimer ( ) ;
1318
1318
}
@@ -1335,7 +1335,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1335
1335
}
1336
1336
1337
1337
public checkSession ( ) : void {
1338
- const iframe : any = document . getElementById ( this . sessionCheckIFrameName ) ;
1338
+ const iframe : any = this . document . getElementById ( this . sessionCheckIFrameName ) ;
1339
1339
1340
1340
if ( ! iframe ) {
1341
1341
this . logger . warn (
0 commit comments