Skip to content

Commit

Permalink
Add Navigator and more navigation pieces (web-platform-dx#1931)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
  • Loading branch information
2 people authored and vwallen committed Nov 5, 2024
1 parent a7f30e7 commit 6b81ac7
Show file tree
Hide file tree
Showing 18 changed files with 380 additions and 1 deletion.
5 changes: 5 additions & 0 deletions features/cookie-enabled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: cookieEnabled
description: "The `navigator.cookieEnabled` property returns a Boolean value for whether the browser accepts or ignores attempts to write cookie data."
spec: https://html.spec.whatwg.org/multipage/system-state.html#cookies
compat_features:
- api.Navigator.cookieEnabled
16 changes: 16 additions & 0 deletions features/cookie-enabled.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated from: cookie-enabled.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: low
baseline_low_date: 2024-09-16
support:
chrome: "1"
chrome_android: "18"
edge: "12"
firefox: "1"
firefox_android: "4"
safari: "18"
safari_ios: "18"
compat_features:
- api.Navigator.cookieEnabled
7 changes: 7 additions & 0 deletions features/hardware-concurrency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: hardwareConcurrency
description: "The `navigator.hardwareConcurrency` read-only property returns the number of logical processors available to run threads on the user's computer."
spec: https://html.spec.whatwg.org/multipage/workers.html#navigator.hardwareconcurrency
caniuse: hardwareconcurrency
compat_features:
- api.Navigator.hardwareConcurrency
- api.WorkerNavigator.hardwareConcurrency
14 changes: 14 additions & 0 deletions features/hardware-concurrency.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated from: hardware-concurrency.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "37"
chrome_android: "37"
edge: "15"
firefox: "48"
firefox_android: "48"
compat_features:
- api.Navigator.hardwareConcurrency
- api.WorkerNavigator.hardwareConcurrency
12 changes: 12 additions & 0 deletions features/language.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Language
description: "The `navigator.language` read-only property returns a string representing the preferred language of the user, usually the language of the browser UI. The `navigator.languages` read-only property returns an array of strings representing the user's preferred languages."
spec: https://html.spec.whatwg.org/multipage/system-state.html#language-preferences
status:
compute_from: api.Navigator.language
compat_features:
- api.Navigator.language
- api.Navigator.languages
- api.Window.languagechange_event
- api.WorkerGlobalScope.languagechange_event
- api.WorkerNavigator.language
- api.WorkerNavigator.languages
79 changes: 79 additions & 0 deletions features/language.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Generated from: language.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "1"
chrome_android: "18"
edge: "12"
firefox: "1"
firefox_android: "4"
safari: "1"
safari_ios: "1"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "1"
# firefox_android: "4"
# safari: "1"
# safari_ios: "1"
- api.Navigator.language

# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "3.5"
# firefox_android: "4"
# safari: "10"
# safari_ios: "10"
- api.WorkerNavigator.language

# baseline: high
# baseline_low_date: 2017-10-17
# baseline_high_date: 2020-04-17
# support:
# chrome: "37"
# chrome_android: "37"
# edge: "16"
# firefox: "32"
# firefox_android: "32"
# safari: "10.1"
# safari_ios: "10.3"
- api.Navigator.languages
- api.WorkerNavigator.languages

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
# support:
# chrome: "37"
# chrome_android: "37"
# edge: "79"
# firefox: "32"
# firefox_android: "4"
# safari: "10.1"
# safari_ios: "10.3"
- api.Window.languagechange_event

# baseline: false
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "79"
# firefox: "74"
# firefox_android: "79"
# safari_ios: "5"
- api.WorkerGlobalScope.languagechange_event
13 changes: 12 additions & 1 deletion features/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
name: Navigation API
description: The `navigation` API provides mechanisms to initiate, intercept, and manage browser navigation actions.
description: The `navigation` API initiates, intercepts, or modifies browser navigation actions. Not to be confused with the `navigator` API.
spec: https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api
status:
compute_from: api.Navigation
compat_features:
- api.NavigateEvent
- api.NavigateEvent.NavigateEvent
- api.NavigateEvent.canIntercept
- api.NavigateEvent.destination
- api.NavigateEvent.downloadRequest
- api.NavigateEvent.formData
- api.NavigateEvent.hasUAVisualTransition
- api.NavigateEvent.hashChange
- api.NavigateEvent.info
- api.NavigateEvent.intercept
- api.NavigateEvent.navigationType
- api.NavigateEvent.scroll
- api.NavigateEvent.signal
- api.NavigateEvent.userInitiated
- api.Navigation
- api.Navigation.activation
- api.Navigation.back
- api.Navigation.canGoBack
- api.Navigation.canGoForward
Expand All @@ -28,6 +35,10 @@ compat_features:
- api.Navigation.transition
- api.Navigation.traverseTo
- api.Navigation.updateCurrentEntry
- api.NavigationActivation
- api.NavigationActivation.entry
- api.NavigationActivation.from
- api.NavigationActivation.navigationType
- api.NavigationCurrentEntryChangeEvent
- api.NavigationCurrentEntryChangeEvent.NavigationCurrentEntryChangeEvent
- api.NavigationCurrentEntryChangeEvent.from
Expand Down
33 changes: 33 additions & 0 deletions features/navigation.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ status:
chrome_android: "102"
edge: "102"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "102"
# chrome_android: "102"
# edge: "102"
- api.NavigateEvent
- api.NavigateEvent.NavigateEvent
- api.NavigateEvent.destination
Expand Down Expand Up @@ -58,3 +64,30 @@ compat_features:
- api.NavigationTransition.from
- api.NavigationTransition.navigationType
- api.Window.navigation

# baseline: false
# support:
# chrome: "105"
# chrome_android: "105"
# edge: "105"
- api.NavigateEvent.canIntercept
- api.NavigateEvent.intercept
- api.NavigateEvent.scroll

# baseline: false
# support:
# chrome: "118"
# chrome_android: "118"
# edge: "118"
- api.NavigateEvent.hasUAVisualTransition

# baseline: false
# support:
# chrome: "123"
# chrome_android: "123"
# edge: "123"
- api.Navigation.activation
- api.NavigationActivation
- api.NavigationActivation.entry
- api.NavigationActivation.from
- api.NavigationActivation.navigationType
6 changes: 6 additions & 0 deletions features/navigator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Navigator
description: "The window.navigator API is a generic global object, under which many other, more interesting APIs are located. It doesn't do anything interesting on its own."
spec: https://html.spec.whatwg.org/multipage/system-state.html#the-navigator-object
compat_features:
- api.Navigator
- api.Window.navigator
18 changes: 18 additions & 0 deletions features/navigator.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated from: navigator.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "1"
chrome_android: "18"
edge: "12"
firefox: "1"
firefox_android: "4"
safari: "1"
safari_ios: "1"
compat_features:
- api.Navigator
- api.Window.navigator
15 changes: 15 additions & 0 deletions features/online.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Online status
description: The `navigator.onLine` property returns a Boolean for whether the browser is connected to some network (though not necessarily the internet). The `online` and `offline` events fire when the connection state changes.
spec:
- https://html.spec.whatwg.org/multipage/system-state.html#navigator.online
- https://html.spec.whatwg.org/multipage/indices.html#event-online
caniuse: online-status
status:
compute_from: api.Navigator.onLine
compat_features:
- api.Navigator.onLine
- api.Window.offline_event
- api.Window.online_event
- api.WorkerGlobalScope.offline_event
- api.WorkerGlobalScope.online_event
- api.WorkerNavigator.onLine
65 changes: 65 additions & 0 deletions features/online.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Generated from: online.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "2"
chrome_android: "18"
edge: "12"
firefox: "1.5"
firefox_android: "4"
safari: "4"
safari_ios: "3.2"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "2"
# chrome_android: "18"
# edge: "12"
# firefox: "1.5"
# firefox_android: "4"
# safari: "4"
# safari_ios: "3.2"
- api.Navigator.onLine

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "3"
# chrome_android: "18"
# edge: "12"
# firefox: "9"
# firefox_android: "9"
# safari: "4"
# safari_ios: "3"
- api.Window.offline_event
- api.Window.online_event

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "3.5"
# firefox_android: "4"
# safari: "4"
# safari_ios: "5"
- api.WorkerNavigator.onLine

# baseline: false
# support:
# firefox: "29"
# firefox_android: "29"
# safari: "8"
# safari_ios: "8"
- api.WorkerGlobalScope.offline_event
- api.WorkerGlobalScope.online_event
5 changes: 5 additions & 0 deletions features/pdf-viewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: pdfViewerEnabled
description: The `navigator.pdfViewerEnabled` read-only property returns a Boolean for whether the browser navigates to and shows a PDF in the browser window or downloads the PDF.
spec: https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewing-support
compat_features:
- api.Navigator.pdfViewerEnabled
16 changes: 16 additions & 0 deletions features/pdf-viewer.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated from: pdf-viewer.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: low
baseline_low_date: 2023-03-27
support:
chrome: "94"
chrome_android: "94"
edge: "94"
firefox: "99"
firefox_android: "99"
safari: "16.4"
safari_ios: "16.4"
compat_features:
- api.Navigator.pdfViewerEnabled
6 changes: 6 additions & 0 deletions features/registerprotocolhandler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: registerProtocolHandler
description: "The `navigator.registerProtocolHandler()' method declares a site's ability to handle an address scheme (also known as a protocol). For example, an email site can register to open `mailto:` URLs or a VoIP site to open `tel:` URLs."
spec: https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
compat_features:
- api.Navigator.registerProtocolHandler
- api.Navigator.unregisterProtocolHandler
23 changes: 23 additions & 0 deletions features/registerprotocolhandler.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated from: registerprotocolhandler.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "38"
edge: "79"
compat_features:
# baseline: false
# support:
# chrome: "13"
# edge: "79"
# firefox: "2"
# firefox_android: "4"
- api.Navigator.registerProtocolHandler

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "38"
# edge: "79"
- api.Navigator.unregisterProtocolHandler
6 changes: 6 additions & 0 deletions features/user-agent-sniffing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: User agent sniffing
description: "The `navigator.userAgent` read-only property returns the user agent string for the current browser. Selectively showing content based on the user agent string is unreliable. Consider using feature detection instead."
spec: https://html.spec.whatwg.org/multipage/system-state.html#the-navigator-object
compat_features:
- api.Navigator.userAgent
- api.WorkerNavigator.userAgent
Loading

0 comments on commit 6b81ac7

Please sign in to comment.