-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Description
We can control when work is done, while also allowing pre-<body>
loading of JS (if required) by revisiting when these events are added in support of the overlay stack.
spectrum-web-components/packages/overlay/src/overlay-stack.ts
Lines 154 to 159 in 1ffdbe1
private addEventListeners(): void { | |
this.document.addEventListener('click', this.handleMouseCapture, true); | |
this.document.addEventListener('click', this.handleMouse); | |
this.document.addEventListener('keyup', this.handleKeyUp); | |
window.addEventListener('resize', this.handleResize); | |
} |
private get document(): Document {
return this.root.ownerDocument /* c8 ignore next */ || document;
}
The this.document
values resolve to undefined
when run before <body>
preventing page blocking JS loading techniques.