Skip to content
0

katanakit-js / useSetTempTitle

Function: useSetTempTitle() ​

ts
function useSetTempTitle(tempTitle, durationMs?): void;

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

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

Parameters ​

ParameterTypeDefault valueDescription
tempTitlestringundefinedThe temporary title to display.
durationMsnumber3000How long to show it (default: 3000).

Returns ​

void

Example ​

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

Released under the MIT License.