Microsoft’s Edge team propose a new API to better support foldable phones


11, 2019

Folding phones and tablets may be the future, but developers are ill-prepared to support the ever-changing form factors of these devices.

To help out web developers in particular, Microsoft has proposed a new API which would help developers better plan the layout of their pages to take into account the variable nature of folding devices.

Called the Window Segments Enumeration API, the aim is to help developers effectively layout the content in a window that spans multiple displays and to help them react when areas of that window are occluded by the OS, for example when soft keyboard pops up.

The Window Segments represent the regions (and their dimensions) of the window that reside on separate (adjacent) displays. Window Segment dimensions are expressed in CSS pixels and will be exposed via a JavaScript API that allows developers to enumerate segments, including about regions that are occluded.

This proposal is primarily aimed at reactive scenarios, where an application wants to take advantage of the fact that it spans multiple displays, by virtue of the user/window manager placing it in that state.

While Microsoft may be working to better support folding Android phones as part of their commitment to Chromium, we can’t help but remember that a number of Windows OEMs are also working on folding laptops and that this technology may be needed there also.

Web techies can read more at Github here.

Via WindowsLatest

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}