How to make NW.js not ignore my win.title set?

Viewed 81

Code:

// title set to "foo" by default
var win = nw.Window.get();
console.log(win.title);
win.title = 'bar';
console.log(win.title);

Expected output:

foo
bar

Actual output:

foo
foo

According to the manual:

win.title

Get or set window’s title.

Source: http://docs.nwjs.io/en/v0.13.0-rc3/References/Window/#wintitle

1 Answers

Based on the docs, your code should work. So, you might want to file a bug against NW.js.

That said, the following appears to be a valid workaround:

const win = nw.Window.get();
win.window.document.title = 'bar';
Related