Next Experience クライアント側スクリプティンググローバル変数
Next Experience グローバル変数は、ページに適用されるかどうかを判断する Next Experience ためにクライアントスクリプトで使用されます。
- NOW.isUsingPolaris
- 現在のページに適用される場合は Next Experiencetrue を返します。
- NOW.isPolarisWrapper
- ページが で実行されているNext Experience 統一ナビゲーション場合は true を返します。このグローバル変数は、.統一ナビゲーション
統一ナビゲーション の詳細については、「Next Experience 統一ナビゲーション の使用」を参照してください。
クライアントスクリプト:
// Reload the current page in the unified navigator if not currently in the unified nav
if (NOW.isUsingPolaris && (!top.NOW || top.NOW.isPolarisWrapper !== "true")) {
var currentPath = window.location.pathname + window.location.search;
top.window.location.href = "/now/nav/ui/classic/params/target/" + encodeURIComponent(currentPath)
}