MCPcopy Index your code
hub / github.com/plotly/dash / updateTitle

Function updateTitle

dash/dash-renderer/src/observers/documentTitle.ts:4–25  ·  view source on GitHub ↗
(getState: () => IStoreState)

Source from the content-addressed store, hash-verified

2import {IStoreState} from '../store';
3
4const updateTitle = (getState: () => IStoreState) => {
5 const {config, isLoading} = getState();
6
7 const update_title = config?.update_title;
8
9 if (!update_title) {
10 return;
11 }
12
13 if (isLoading) {
14 if (document.title !== update_title) {
15 observer.title = document.title;
16 document.title = update_title;
17 }
18 } else {
19 if (document.title === update_title) {
20 document.title = observer.title;
21 } else {
22 observer.title = document.title;
23 }
24 }
25};
26
27const observer: IStoreObserverDefinition<IStoreState> = {
28 inputs: ['isLoading'],

Callers 1

documentTitle.tsFile · 0.85

Calls 1

getStateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…