Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WebWeWantBot opened this issue Apr 12, 2021 · 1 comment
Assignees
Labels
HTML want Incoming requests from the community

Comments

@WebWeWantBot
Copy link


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/

@gregwhitworth
Copy link
Contributor

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.

@gregwhitworth gregwhitworth self-assigned this Apr 13, 2021
@gregwhitworth gregwhitworth added the want Incoming requests from the community label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML want Incoming requests from the community
Projects
None yet
Development

No branches or pull requests

2 participants