#do partials trigger astro:page-load?

2 messages · Page 1 of 1 (latest)

wheat canyonBOT
#

Hi @fair silo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The astro:page-load event is dispatched after a page completes loading, whether from a navigation using view transitions or native to the browser. This event is used to execute code that would normally run on DOMContentLoaded when view transitions are enabled on the page (source (https://docs.astro.build/en/reference/api-reference/#astropage-load-event)).

However, the documentation does not specifically mention that fetching an Astro partial triggers the astro:page-load event. Partials in Astro are page components located within src/pages/ that are not intended to render as full pages. They are used in conjunction with a front-end library to dynamically update a section of a page (source (https://docs.astro.build/en/basics/astro-pages/#page-partials)).

Given this information, it's not clear if fetching a partial would trigger the astro:page-load event. It might be best to test this in your specific implementation or consult further Astro documentation or community resources.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: