nwjs - 如何让 NW.js 不忽略我的 win.title 集?
问题描述
代码:
// title set to "foo" by default
var win = nw.Window.get();
console.log(win.title);
win.title = 'bar';
console.log(win.title);
预期输出:
foo
bar
实际输出:
foo
foo
根据手册:
win.title
获取或设置窗口的标题。
来源:http ://docs.nwjs.io/en/v0.13.0-rc3/References/Window/#wintitle
解决方案
根据文档,您的代码应该可以工作。因此,您可能想要针对 NW.js 提交错误。
也就是说,以下似乎是一个有效的解决方法:
const win = nw.Window.get();
win.window.document.title = 'bar';
推荐阅读
- jenkins - 如何根据多个/不同的参数多次运行 Jenkins 管道。(详情请参阅说明)
- c# - 使用 NetTopologySuite 保存几何时的 Entity Framework Core IndexOutOfRangeException
- angular - 如何从 ionic 3 中的 map.data.addListener 调用函数?
- react-native - 按钮未显示在 android 中的 cardView 上,但在 iOS 中以反应本机工作
- ruby-on-rails - PG::InvalidParameterValue:错误:参数“client_min_messages”的值无效:“恐慌”
- elasticsearch - 带有部分的弹性搜索模板
- ldap - 从内部目录迁移到 LDAP 时在 JIRA 中维护用户历史记录
- sql-server - 如何处理带有 [ ] 方括号的表名?
- php - PHP file_get_contents 在 OpenStreetMap API 中使用 & 代替 & 并返回 403
- sql - SQL查询如何在不同条件下从同一张表的两列中划分值