Skip to content

I want the browser to provide the equivalent of a JavaScript Promise but for HTML elements #347

Closed
@WebWeWantBot

Description

@WebWeWantBot

With asynchronous rendering in modern web pages, one problem I run into often is that I can't tell when the page has finished loading. The browser does not provide much or any user feedback, and although a developer could provide it to the nth degree, it requires substantial extra work.

What if we could tell the browser that the contents of a certain DIV will contain additional content at some future time, tell the browser about the asynchronous request that will populate the DIV when it returns, and — in the meantime — give the browser a template for the div that it uses to show something like "loading…"? All of this is possible today with custom coding, but it would be better if the browser that frames and populates content provides it as a standardized feature.

I'm not completely current on HTML 5 features yet, so I don't know if it may already have the capability to mark a div as being populated asynchronously using an attribute. If not, that might be a useful feature to have. Overall, this is calling attention to a downside of asynchronous data exchange in modern web architecture that should be addressed at the platform level, instead of being handled over and over again by the web developers.

Metadata

Metadata

Assignees

Labels

HTMLwantIncoming requests from the community

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions