File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ export class SyncPromise<T> implements PromiseLike<T> {
58
58
this . _state = States . PENDING ;
59
59
this . _handlers = [ ] ;
60
60
61
+ // We set this functions here as class properties, to make binding them easier
62
+ // This way, the `this` context is easier to maintain
61
63
this . _resolve = ( value ?: T | PromiseLike < T > | null ) => {
62
64
this . _setResult ( States . RESOLVED , value ) ;
63
65
} ;
Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ export class ReplayContainer implements ReplayContainerInterface {
235
235
} ) ;
236
236
}
237
237
238
+ // We set these handler properties as class properties, to make binding/unbinding them easier
238
239
this . _handleVisibilityChange = ( ) => {
239
240
if ( WINDOW . document . visibilityState === 'visible' ) {
240
241
this . _doChangeToForegroundTasks ( ) ;
You can’t perform that action at this time.
0 commit comments