Navigator: thuộc tính windowControlsOverlay

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Thuộc tính chỉ đọc windowControlsOverlay của Navigator giao diện trả về giao diện WindowControlsOverlay, hiển thị thông tin về hình dạng thanh tiêu đề trong Ứng dụng web lũy tiến trên máy tính để bàn sử dụng Window Controls Overlay API.

Các ứng dụng web lũy tiến được cài đặt trên máy tính để bàn Hệ điều hành có thể chọn tham gia Tính năng Lớp phủ Điều khiển Cửa sổ bằng cách sử dụng giá trị window-controls-overlay trong Thành viên bảng kê khai ứng dụng web display_override.

Làm như vậy sẽ ẩn thanh tiêu đề cửa sổ mặc định và cấp cho ứng dụng quyền truy cập vào toàn bộ khu vực của cửa sổ ứng dụng.

Giá trị

Giao diện WindowControlsOverlay.

Ví dụ

js
if ("windowControlsOverlay" in navigator) {
  const rect = navigator.windowControlsOverlay.getTitlebarAreaRect();
  // Do something with the title bar area rectangle.
} else {
  // The Window Controls Overlay feature is not available.
}

Thông số kỹ thuật

Specification
Window Controls Overlay
# windowcontrolsoverlay-interface

Khả năng tương thích của trình duyệt