CSSUnparsedValue: hàm khởi tạo CSSUnparsedValue()

Khả dụng hạn chế

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

Hàm khởi tạo CSSUnparsedValue() tạo một đối tượng CSSUnparsedValue mới đại diện cho các giá trị thuộc tính tham chiếu đến các thuộc tính tùy chỉnh.

Cú pháp

js
new CSSUnparsedValue(members)

Tham số

members

Một mảng có các giá trị phải là chuỗi hoặc CSSVariableReferenceValue.

Ví dụ

js
const value = new CSSUnparsedValue(["4deg"]);
const values = new CSSUnparsedValue(["1em", "#445566", "-45px"]);

console.log(value); // CSSUnparsedValue {0: "4deg", length: 1}
console.log(values); // CSSUnparsedValue {0: "1em", 1: "#445566", 2: "-45px", length: 3}

Thông số kỹ thuật

Thông số kỹ thuật
CSS Typed OM Level 1
# dom-cssunparsedvalue-cssunparsedvalue

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

Xem thêm