Description
title: I want the browser to provide the equivalent of a JavaScript Promise but for HTML elements
date: 2021-04-12T17:32:12.095Z
submitter: Michael Keister
number: 6074841c16b66300c1a3b4d9
tags: [ ]
discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/
status: [ discussing || in-progress || complete ]
related:
- title:
url:
type: [ article || explainer || draft || spec || note || discussion ]
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 async request that will populate the DIV when it returns, and in the mean time 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 tool (the browser) that frames and populates content provides it as a standardized feature. I'm not completely current on HTML 5 features yet and 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.
If posted, this will appear at https://webwewant.fyi/wants/6074841c16b66300c1a3b4d9/
Activity