WindowClient.navigate()

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

WindowClient 接口的 navigate() 方法加载特定的 URL 地址到一个被控制的浏览器页面,并返回一个当前 WindowClient 议的 Promise 对象。

语法

WindowClient.navigate(url).then(function(WindowClient) {
  // do something with your WindowClient after navigation
});

参数

url

跳转地址

返回值

一个 WindowClient决议的Promise对象。

Specifications

Specification
Service Workers
# client-navigate

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
navigate

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Has more compatibility info.