File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import type {
9
9
} from './types' ;
10
10
11
11
/** Key to store listeners on the host */
12
- const DESCRIPTORS = ( window . Symbol || String ) ( '__esl_descriptors' ) ;
12
+ const DESCRIPTORS = Symbol . for ( '__esl_descriptors' ) ;
13
13
14
14
/**
15
15
* @param host - host object
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import type {
18
18
} from './types' ;
19
19
20
20
/** Key to store listeners on the host */
21
- const LISTENERS = ( window . Symbol || String ) ( '__esl_listeners' ) ;
21
+ const LISTENERS = Symbol . for ( '__esl_listeners' ) ;
22
22
23
23
/**
24
24
* Splits and deduplicates event string
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type {
5
5
} from './esl-mixin-element' ;
6
6
7
7
// Private key to store mixin instances
8
- const STORE = ( window . Symbol || String ) ( '__esl_mixins' ) ;
8
+ const STORE = Symbol . for ( '__esl_mixins' ) ;
9
9
10
10
// Singleton for registry
11
11
let global : ESLMixinRegistry ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import {uniq} from '../../misc/array';
2
2
import { overrideEvent } from './misc' ;
3
3
4
4
/** Key to store listeners on the {@link SyntheticEventTarget} instance*/
5
- const LISTENERS : unique symbol = ( window . Symbol || String ) ( '_listeners' ) as any ;
5
+ const LISTENERS : unique symbol = Symbol ( '_listeners' ) ; // private
6
6
7
7
/**
8
8
* Synthetic implementation of EventTarget
Original file line number Diff line number Diff line change 1
- const SEQUENCE_KEY : unique symbol = ( ( window . Symbol || String ) ( '__esl_sequences__' ) ) as any ;
1
+ const SEQUENCE_KEY : unique symbol = Symbol . for ( '__esl_sequences' ) ;
2
2
const ns = window || global ;
3
3
const sequences = ns [ SEQUENCE_KEY ] || new Map < string , number > ( ) ;
4
4
ns [ SEQUENCE_KEY ] = sequences ;
You can’t perform that action at this time.
0 commit comments