chromium/third_party/blink/renderer/modules/file_system_access/file_system_observer.idl

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// TODO(https://crbug.com/320563255): Include spec link.
// TODO(https://crbug.com/1444874): Measure usage.

[
    Exposed=(DedicatedWorker,SharedWorker,Window),
    SecureContext,
    RuntimeEnabled=FileSystemObserver
] interface FileSystemObserver {
  [
    CallWith=ScriptState,
    RaisesException,
    Measure
  ] constructor(FileSystemObserverCallback callback);

  [
    CallWith=ScriptState,
    RaisesException,
    Measure
  ] Promise<undefined> observe(FileSystemHandle handle,
                          optional FileSystemObserverObserveOptions options = {});
  [
    RuntimeEnabled=FileSystemObserverUnobserve
  ] void unobserve(FileSystemHandle handle);
  [Measure] void disconnect();
};