Skip to content

Commit

Permalink
fix(scully-plugin-puppeteer): change noew reseved 'onCustomEvent' to …
Browse files Browse the repository at this point in the history
…'onRenderReady' to prevent the default 25 seconds timeout (#1593)
  • Loading branch information
SanderElias authored Jun 13, 2022
1 parent 5243480 commit 3dea6c4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const playwrightRenderer = async (route: HandledRoute): Promise<string> =
}

/** this will be called from the browser, but runs in node */
await page.exposeFunction('onCustomEvent', () => {
await page.exposeFunction('onRenderReady', () => {
resolve();
});

Expand Down Expand Up @@ -79,7 +79,7 @@ export const playwrightRenderer = async (route: HandledRoute): Promise<string> =
/** set "running" mode */
window['ScullyIO'] = 'running';
window.addEventListener('AngularReady', () => {
window['onCustomEvent']();
window['onRenderReady']();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const puppeteerRender = async (route: HandledRoute): Promise<string> => {
}

/** this will be called from the browser, but runs in node */
await page.exposeFunction('onCustomEvent', () => {
await page.exposeFunction('onRenderReady', () => {
resolve();
});

Expand Down Expand Up @@ -125,7 +125,7 @@ export const puppeteerRender = async (route: HandledRoute): Promise<string> => {
/** set "running" mode */
window['ScullyIO'] = 'running';
window.addEventListener('AngularReady', () => {
window['onCustomEvent']();
window['onRenderReady']();
});
});

Expand Down
100 changes: 38 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3dea6c4

Please sign in to comment.