FileSystemObserver: disconnect() method
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
Phương thức disconnect() của giao diện
FileSystemObserver dừng observer quan sát hệ thống tệp.
Cú pháp
disconnect()
Tham số
Không có.
Giá trị trả về
Không có (undefined).
Ví dụ
>Dừng quan sát hệ thống tệp
Giả sử một phiên bản FileSystemObserver đang có sẵn, bạn có thể gọi phương thức disconnect() trên nó khi muốn dừng quan sát các thay đổi đối với mục nhập hệ thống tệp:
observer.disconnect();
Thông số kỹ thuật
Hiện chưa là một phần của bất kỳ thông số kỹ thuật nào. Xem https://github.com/whatwg/fs/pull/165 để biết PR thông số kỹ thuật liên quan.
Tương thích trình duyệt
Xem thêm
- File System API
- The File System Observer API origin trial trên developer.chrome.com (2024)