Skip to content

UseSetTempTitle

katanakit-js / useSetTempTitle

function useSetTempTitle(tempTitle, durationMs?): void;

Defined in: infrastructure/viewport/viewport.service.ts:375

Temporarily changes the document title, restoring the original after durationMs.

Parameter Type Default value Description
tempTitle string undefined The temporary title to display.
durationMs? number 3000 How long to show it (default: 3000).

void

useSetTempTitle("(2) New messages!", 5000);
// title reverts after 5 seconds