-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request - Add events for prerender phases #402
Comments
Totally possible, but remember prerender is completely synchronous, so you can just do: prerenderTemplate: function containerTemplate({ doc, event }) {
log('START_PRERENDER');
// do the prerender
log('END_PRERENDER');
} That said -- this won't be that useful since:
|
What about the time it takes to insert the prerenderFrame into the DOM? Here's the code I'm referring to. Line 817 in c10ac41
EVENT.PRERENDERED to include that cost.
|
Aaah that's fair. Yeah it's still synchronous; but definitely wouldn't hurt to measure. No objections! |
Sweet thanks for the review @bluepnume! |
@gregjopa Are we able to pull this version (with PRERENDER/ED)? it's not available on the Cloudflare CDN and I can't get npm to install v10.1.0, as either a version or tag. Please help if you have a moment |
Zoid has the following
event
feature for tracking when rendering completes: https://github.com/krakenjs/zoid/blob/main/docs/api/create.md#listening-to-zoid-events. TheseRENDER
andRENDERED
events work great for measuring rendering performance. However, we are missing events for knowing when the prerender phase is complete withprerenderTemplate
.To solve this problem let's add the following new events for hooking into the prerender lifecycle:
The text was updated successfully, but these errors were encountered: