Skip to content

svelte: Flash of unstyled content #13436

@Turbo87

Description

@Turbo87

Current Behavior

reported by @bjorn3 via Zulip

During page load there is a white flash. The ember.js version shows the green background until the javascript is fully ready.

It seems that DOMContentLoaded with the svelte version gets triggered long before the page is actually ready, while for the ember.js version it takes longer, but when it triggers the page is almost fully loaded already. This is probably because svelte does an asynchronous load of the javascript by inserting the main script element at runtime, while ember.js does a blocking load.

Expected Behavior

it should ideally only start rendering once the CSS has been loaded, to avoid the FOUC.

Steps To Reproduce

Environment

  • Browser:
  • OS:

Anything else?

this is related to #12515

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-svelteC-bug 🐞Category: unintended, undesired behavior

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions