|
|
@ -85,34 +85,12 @@ async function init() { |
|
|
|
const libcoreVersion = await libcoreGetVersion.send().toPromise() |
|
|
|
logger.log('libcore', libcoreVersion) |
|
|
|
|
|
|
|
// DOM elements can have a data-role that identify the UI entity
|
|
|
|
// and that allow us to track interactions with this.
|
|
|
|
window.addEventListener('click', ({ target }) => { |
|
|
|
const { dataset } = target |
|
|
|
if (dataset) { |
|
|
|
const { role, roledata } = dataset |
|
|
|
if (role) { |
|
|
|
logger.onClickElement(role, roledata) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
window.addEventListener('keydown', (e: SyntheticKeyboardEvent<any>) => { |
|
|
|
if (e.which === TAB_KEY) { |
|
|
|
if (!isGlobalTabEnabled()) enableGlobalTab() |
|
|
|
logger.onTabKey(document.activeElement) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
window.addEventListener('click', ({ target }) => { |
|
|
|
const { dataset } = target |
|
|
|
if (dataset) { |
|
|
|
const { role, roledata } = dataset |
|
|
|
if (role) { |
|
|
|
logger.onClickElement(role, roledata) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|