ScreenDetailed: thuộc tính label

Limited availability

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

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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

Thuộc tính chỉ đọc label của giao diện ScreenDetailed là một chuỗi cung cấp nhãn mô tả cho màn hình, ví dụ "Built-in Retina Display".

Điều này hữu ích khi xây dựng danh sách tùy chọn để hiển thị cho người dùng nếu bạn muốn họ chọn màn hình để hiển thị nội dung.

Giá trị

Một chuỗi.

Ví dụ

js
const screenDetails = await window.getScreenDetails();

// Return the label of the first screen
const screen1Label = screenDetails.screens[0].label;

Thông số kỹ thuật

Specification
Window Management
# ref-for-dom-screendetailed-label

Tương thích trình duyệt

Xem thêm