【发布时间】:2018-03-03 13:00:27
【问题描述】:
我有一个在 Windows 10 (UWP) 上运行的 Cordova 应用程序,我正在使用 Visual Studio 2017 构建 Cordova 项目。
托管窗口的标题栏中有一个我要删除的箭头。
这是我正在谈论的图片:
我在 StackOverflow 上看到另一个问题,该问题的答案是使用以下代码:
if (cordova.platformId == "windows")
{
var currentView = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
currentView.appViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.collapsed;
}
但是,这对我不起作用。
我在 DeviceReady 之后执行检查,cordova.platformId 确实等于“windows”,这很好。
JavaScript 代码如何执行 Windows.UI.Core.SystemNavigationManger 命名空间?根据以下链接,我了解它是一个 UWP 命名空间, Windows.UI.Core.SystemNavigationManger,但是 JavaScript 代码在哪里定义和访问它?我是否缺少第 3 方 Cordova 插件?
【问题讨论】:
-
查看官方代码:navigator.js
-
@Macer 你解决了吗?问题请帮帮我。
标签: javascript windows cordova uwp