WordPress / wordpress-playground

Run WordPress in the browser via WebAssembly PHP
https://w.org/playground/
GNU General Public License v2.0
1.64k stars 257 forks source link

Evaluate the File System Observer API #1788

Open adamziel opened 1 month ago

adamziel commented 1 month ago

Chrome 129 introduces observable filesystem handles:

The File System Observer API, in origin trial from Chrome 129, changes that, and lets developers be alerted automatically when changes happen. This guide explains how it works and how to try the feature.

// Observe a file.
await observer.observe(fileHandle);
// Observe a directory.
await observer.observe(directoryHandle);
// Observe a directory recursively.
await observer.observe(directoryHandle, {recursive: true});

This could allow us to:

Let's explore how viable that is and, if there are rough edges, provide feedback to the team working on that feature. @tomayac, what would be the best way to share our feedback?

tomayac commented 1 month ago

Amazing, looking forward to hearing how it goes! You can provide feedback on the API shape, or on implementation bugs by commenting. Thanks so much! For everything else, just email me.