Skip to content

[Overlay] Control when work is done #1512

@Westbrook

Description

@Westbrook

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions