generated from shgysk8zer0/npm-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
consts.js
49 lines (46 loc) · 1.38 KB
/
consts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
export const SYMBOLS = {
render: Symbol.for('aegis:render'),
observeStates: Symbol.for('aegis:states:observe'),
initialize: Symbol.for('aegis:initialize'),
initialized: Symbol.for('aegis:initialized'),
setValue: Symbol.for('aegis:value:set'),
sanitizeValue: Symbol.for('aegis:value:sanitize'),
hasState: Symbol.for('aegis:states:has'),
getStates: Symbol.for('aegis:states:get'),
};
/**
* Custom States are `--` prefixed for compatibility with bad Chrome implementation
*/
export const STATES = {
initialized: '--initialized',
loading: '--loading',
ready: '--ready',
valid: '--valid',
invalid: '--invalid',
required: '--required',
disabled: '--disabled',
readOnly: '--readonly',
checked: '--checked',
};
export const TRIGGERS = {
constructed: 'aegis:constructed',
connected: 'aegis:connected',
disconnected: 'aegis:disconnected',
slotChanged: 'aegis:slotchanged',
attributeChanged: 'aegis:attributechanged',
adopted: 'aegis:adopted',
stateChanged: 'aegis:state:changed',
unknown: 'aegis:unknown',
formAssociated: 'aegis:form:associated',
formDisabled: 'aegis:form:disabled',
formReset: 'aegis:form:reset',
formStateRestore: 'aegis:form:state-restore',
colorSchemeChanged: 'aegis:color-scheme-changed',
};
export const EVENTS = {
connected: 'aegis:connected',
disconnected: 'aegis:disconnected',
adopted: 'aegis:adopted',
valid: 'aegis:valid',
invalid: 'aegis:invalid',
};