Skip to content

Indication that the window/page assets have loaded #3709

@mcoker

Description

@mcoker

The main motivation for this is with the screenshot/visual regression testing tool in our various workspaces. If an example/demo has a large image or some other kind of asset, it would be great if our screenshot tool could wait until everything on the page has fully loaded before grabbing the screenshot. Our screenshot tool supports readySelector (a class somewhere on the document) and readyEvent (a string logged to the console) as options to trigger a screenshot

I've window.onload in the past to do something like add a .page-loaded class to <body> or log "page loaded" to the console, but I'm not sure if that's valid or outdated in a react app. Is that something we could do for the pages served from the docs framework?

cc @nicolethoen

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions