Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Window and Window Management API #2010

Merged
merged 23 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions features/backdrop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ status:
compute_from: css.selectors.backdrop
compat_features:
- css.selectors.backdrop
- css.selectors.backdrop.dialog
- css.selectors.backdrop.inherit_from_originating_element
13 changes: 13 additions & 0 deletions features/backdrop.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ compat_features:
# safari_ios: "15.4"
- css.selectors.backdrop

# baseline: high
# baseline_low_date: 2022-03-14
# baseline_high_date: 2024-09-14
# support:
# chrome: "37"
# chrome_android: "37"
# edge: "79"
# firefox: "98"
# firefox_android: "98"
# safari: "15.4"
# safari_ios: "15.4"
- css.selectors.backdrop.dialog

# baseline: low
# baseline_low_date: 2024-03-05
# support:
Expand Down
11 changes: 11 additions & 0 deletions features/dialog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@ description: The `<dialog>` HTML element represents a modal or non-modal dialog
spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element
group: html-elements
caniuse: dialog
compat_features:
- api.HTMLDialogElement
- api.HTMLDialogElement.cancel_event
- api.HTMLDialogElement.close
- api.HTMLDialogElement.close_event
- api.HTMLDialogElement.open
- api.HTMLDialogElement.returnValue
- api.HTMLDialogElement.show
- api.HTMLDialogElement.showModal
- html.elements.dialog
- html.elements.dialog.open
1 change: 0 additions & 1 deletion features/dialog.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ compat_features:
- api.HTMLDialogElement.returnValue
- api.HTMLDialogElement.show
- api.HTMLDialogElement.showModal
- css.selectors.backdrop.dialog
- html.elements.dialog
- html.elements.dialog.open
1 change: 1 addition & 0 deletions features/dom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,5 @@ compat_features:
- api.TreeWalker.previousSibling
- api.TreeWalker.root
- api.TreeWalker.whatToShow
- api.Window.document
- api.XMLDocument
1 change: 1 addition & 0 deletions features/dom.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ compat_features:
- api.ProcessingInstruction.target
- api.Text
- api.Text.splitText
- api.Window.document

# baseline: high
# baseline_low_date: 2015-07-29
Expand Down
4 changes: 3 additions & 1 deletion features/history.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: History
description: "The History API manipulates the browser session history, from navigations to state management, in the tab or frame that the current page is loaded in."
description: "The `window.history` API manipulates the browser session history, from navigations to state management, in the tab or frame that the current page is loaded in."
spec: https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-history-interface
caniuse: history
# This gets the feature closest to matching Caniuse.
Expand All @@ -15,3 +15,5 @@ compat_features:
- api.History.replaceState
- api.History.scrollRestoration
- api.History.state
- api.Window.history
autonome marked this conversation as resolved.
Show resolved Hide resolved
- api.Window.popstate_event
14 changes: 14 additions & 0 deletions features/history.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ compat_features:
- api.History.forward
- api.History.go
- api.History.length
- api.Window.history

# ⬇️ Same status as overall feature ⬇️
# baseline: high
Expand All @@ -46,6 +47,19 @@ compat_features:
- api.History.pushState
- api.History.replaceState

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

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
Expand Down
24 changes: 24 additions & 0 deletions features/window-management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Window management
description: "The `window.getScreenDetails()` method gets information about the screens on a device, which you can use to place new windows on a specific screen with `window.open()`."
spec: https://w3c.github.io/window-management/
compat_features:
- api.Element.requestFullscreen.options_screen_parameter
- api.Permissions.permission_window-management
- api.Screen.change_event
- api.Screen.isExtended
- api.ScreenDetailed
- api.ScreenDetailed.availLeft
- api.ScreenDetailed.availTop
- api.ScreenDetailed.devicePixelRatio
- api.ScreenDetailed.isInternal
- api.ScreenDetailed.isPrimary
- api.ScreenDetailed.label
- api.ScreenDetailed.left
- api.ScreenDetailed.top
- api.ScreenDetails
- api.ScreenDetails.currentScreen
- api.ScreenDetails.currentscreenchange_event
- api.ScreenDetails.screens
- api.ScreenDetails.screenschange_event
- api.Window.getScreenDetails
- http.headers.Permissions-Policy.window-management
45 changes: 45 additions & 0 deletions features/window-management.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Generated from: window-management.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "111"
edge: "111"
compat_features:
# baseline: false
# support:
# chrome: "100"
# chrome_android: "100"
# edge: "100"
- api.Screen.change_event
- api.Screen.isExtended
- api.Window.getScreenDetails
- http.headers.Permissions-Policy.window-management

# baseline: false
# support:
# chrome: "100"
# edge: "100"
- api.Element.requestFullscreen.options_screen_parameter
- api.ScreenDetailed
- api.ScreenDetailed.availLeft
- api.ScreenDetailed.availTop
- api.ScreenDetailed.devicePixelRatio
- api.ScreenDetailed.isInternal
- api.ScreenDetailed.isPrimary
- api.ScreenDetailed.label
- api.ScreenDetailed.left
- api.ScreenDetailed.top
- api.ScreenDetails
- api.ScreenDetails.currentScreen
- api.ScreenDetails.currentscreenchange_event
- api.ScreenDetails.screens
- api.ScreenDetails.screenschange_event

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "111"
# edge: "111"
- api.Permissions.permission_window-management
26 changes: 26 additions & 0 deletions features/window.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Window
description: "The `window` global object represents a browser tab or iframe and its relationship to the document and other tabs. It's also a generic global object, under which many other APIs are located."
spec: https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-window-object
status:
compute_from: api.Window
compat_features:
- api.Window
- api.Window.DOMContentLoaded_event
- api.Window.blur_event
- api.Window.close
- api.Window.closed
- api.Window.error_event
- api.Window.focus
- api.Window.focus_event
- api.Window.frameElement
- api.Window.frames
- api.Window.length
- api.Window.load_event
- api.Window.name
- api.Window.open
- api.Window.opener
- api.Window.parent
- api.Window.self
- api.Window.stop
- api.Window.top
- api.Window.window
129 changes: 129 additions & 0 deletions features/window.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Generated from: window.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.Window
- api.Window.close
- api.Window.closed
- api.Window.focus
- api.Window.frames
- api.Window.length
- api.Window.name
- api.Window.opener

# 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.3"
# safari_ios: "1"
- api.Window.load_event
- api.Window.parent

# 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: "3"
# safari_ios: "1"
- api.Window.frameElement
- api.Window.self
- api.Window.top
- api.Window.window

# 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: "3.1"
# safari_ios: "2"
- api.Window.DOMContentLoaded_event

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "5"
# chrome_android: "18"
# edge: "12"
# firefox: "6"
# firefox_android: "6"
# safari: "5.1"
# safari_ios: "5"
- api.Window.blur_event
- api.Window.focus_event

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "10"
# chrome_android: "18"
# edge: "12"
# firefox: "6"
# firefox_android: "6"
# safari: "5.1"
# safari_ios: "5"
- api.Window.error_event

# baseline: high
# baseline_low_date: 2016-08-02
# baseline_high_date: 2019-02-02
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "14"
# firefox: "1"
# firefox_android: "4"
# safari: "3"
# safari_ios: "1"
- api.Window.stop

# baseline: false
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "1"
# firefox_android: "4"
# safari: "1"
- api.Window.open