Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Loading/error CSS classes don't work if the script was loaded in <head> #9

@harriha

Description

@harriha

If you end up including this script in <head>, the loading/error CSS classes don't seem to work.

Yeah, in general, it's not advisable to load scripts like this in <head>, but that might be the case sometimes and things seem broken in that case (example: setting up a quick-and-dirty project with a suboptimal template like I did).

Reason for the bug: a reference to the bodyElement is stored to a local var on script load time, not on bootstrap(). I don't see downsides of deferring this to bootstrap().

Will provide a PR for this, just created this issue here for tracking purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions