Closed davepagurek closed 4 months ago
Thanks @davepagurek. Wondering if @outofambit @stalgiag have any insights on this?
It could be ok if
CodeEmbed
is always eager because they already don't immediately start running until they scroll into view (we have scroll detection and an `IntersectionObserver1 for this.) So maybe it's worth just relying on that?
I agree with this. Thanks @davepagurek
@wagedu mentioned this in a prior comment:
Seems that the culprit is the
lazyLoad
property on theCodeEmbed
widget: https://github.com/processing/p5.js-website/blob/974470a0c2e89f5c50e2cf9d243f47cf12a63179/src/layouts/ReferenceItemLayout.astro#L105This hands things off to the browser and it seems like the browser isn't correctly loading them when they become visible.
It could be ok if
CodeEmbed
is always eager because they already don't immediately start running until they scroll into view (we have scroll detection and an `IntersectionObserver1 for this.) So maybe it's worth just relying on that?