🏠 back to Observable

Windows Placement API to new for observable

Google has released a new API for chrome called the Window-placement API
It’s super power lets you use multiple screens. I think this will finally give VSCode multi-screen abilities.

When testing if this is available in Observable, It says nope.
image
But run from the console it says sweet.
image

I guess this is another permission thing blocking this.

2 Likes

According to this explainer the iframe would require allow="window-placement". Note that you can already open, move and resize windows programmatically, but handling their offsets across different screens is somewhat awkward.

Also, when testing code in the console, be sure to select the right context:

If you run window.getScreens() that way, you should see:

1 Like

… Btw, over the past weeks I’ve been working on a project to allow cell outputs to be detached. Stay tuned!

2 Likes