Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Overlay] Control when work is done #1512

Closed
Westbrook opened this issue Jun 7, 2021 · 0 comments · Fixed by #1682
Closed

[Overlay] Control when work is done #1512

Westbrook opened this issue Jun 7, 2021 · 0 comments · Fixed by #1682

Comments

@Westbrook
Copy link
Contributor

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant