Skip to content

Commit 1c7b97e

Browse files
committed
Set Window title
Window name does not specify the title of the new window. Setting it manually to have better experience.
1 parent 14676df commit 1c7b97e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/real-world/createDevToolsWindow.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
77
* Based on https://gist.github.com/tlrobinson/1e63d15d3e5f33410ef7#gistcomment-1560218.
88
*/
99
export default function createDevToolsWindow(store) {
10+
// Window name.
11+
const name = 'Redux DevTools';
12+
1013
// Give it a name so it reuses the same window.
1114
const win = window.open(
1215
null,
13-
'Redux DevTools',
16+
name,
1417
'menubar=no,location=no,resizable=yes,scrollbars=no,status=no'
1518
);
1619

1720
// Reload in case it's reusing the same window with the old content.
1821
win.location.reload();
22+
23+
// Set visible Window title.
24+
win.document.title = name;
1925

2026
// Wait a little bit for it to reload, then render.
2127
setTimeout(() => render(

0 commit comments

Comments
 (0)