-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Description:
Pretty far on the edge, but I hit this while working on my experiments with Svelte + WebComponents for reusable A-Frame structures.
While in a script that's loaded with the defer
attribute, attempting to insert new entities into the page will cause the inserted entity to attempt to load prematurely and throw errors, in this case the geometry
component is initializing before the systems have been initialized.
You'll see from the logs in the reprex that document.readyState
is interactive
, so it passes this gate in connectedCallback
and tries to load immediately, but also that the system
has not yet been set so it fails.
Since defer causes a script to run before DOMContentLoaded, but apparently after the switch to interactive readyState, this seems the be sneaking into a tiny chink in the A-Frame load order.
- A-Frame Version: 1.4.1
- Platform / Device: desktop chrome & FF
- Reproducible Code Snippet or URL: https://glitch.com/edit/#!/muddy-even-wave (this should render a box but doesn't)