ScreenDetailed: availLeft property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
TheavailLeft read-only property of theScreenDetailed interface is a number representing the x-coordinate (left-hand edge) of the available screen area inside the OS virtual screen arrangement, relative to themulti-screen origin.
This is equal to theScreenDetailed.left property, plus the width of any OS UI element drawn on the left of the screen. Windows cannot be placed in those areas, soavailLeft is useful for giving you the left boundary of the actual area available to open or place windows.
Note:A non-standard implementation of theavailLeft property is available on theScreen interface in all browsers. See theNon-standard example below for usage details, and see theScreen reference page for browser support information relating to the non-standard implementation.
In this article
Value
A number.
Examples
>Window Management API example
// Available in browsers that support the Window Management APIconst screenDetails = await window.getScreenDetails();// Return the availLeft value of the first screenconst screen1AvailLeft = screenDetails.screens[0].availLeft;Non-standard example
// Available in all browsers// Return the availLeft value of the current screenconst screenAvailLeft = window.screen.availLeft;Specifications
| Specification |
|---|
| Window Management> # ref-for-dom-screendetailed-availleft> |