You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
This is a valid want, thanks for filing it. There was a discussion around a skeleton component in Open UI but it didn't focus on the eventing that you referred to for dynamic content. I'd recommend opening an issue there to possibly pivot the discussion around skeleton being a focus on trying to define an anatomy as much as a solution to the problem you denoted. That said I think it will be very hard to define "done" is with dynamic data.
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:
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/
The text was updated successfully, but these errors were encountered: