Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,19 @@ class Jqhtml_Integration {
|
||||
* This runs during framework_modules_define, before any DOM processing.
|
||||
*/
|
||||
static _on_framework_modules_define() {
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
// SSR Preload Data Injection
|
||||
//
|
||||
// If the page was SSR-rendered, window.rsxapp.ssr_preload contains
|
||||
// captured component data from the SSR server. Seed jqhtml's preload
|
||||
// cache so on_load() is skipped for components with matching data.
|
||||
// Must happen before component registration / DOM hydration.
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
if (window.rsxapp && window.rsxapp.page_data && window.rsxapp.page_data.ssr_preload && typeof jqhtml.set_preload_data === 'function') {
|
||||
jqhtml.set_preload_data(window.rsxapp.page_data.ssr_preload);
|
||||
console_debug('JQHTML_INIT', 'SSR preload data seeded: ' + window.rsxapp.page_data.ssr_preload.length + ' entries');
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
// Register Component Classes with jqhtml Runtime
|
||||
//
|
||||
@@ -135,6 +148,12 @@ class Jqhtml_Integration {
|
||||
*/
|
||||
static async _on_framework_modules_init() {
|
||||
await jqhtml.boot();
|
||||
|
||||
// Clear any remaining SSR preload data after hydration completes
|
||||
if (typeof jqhtml.clear_preload_data === 'function') {
|
||||
jqhtml.clear_preload_data();
|
||||
}
|
||||
|
||||
Rsx.trigger('jqhtml_ready');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user