Summarizer: thuộc tính format

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 format chỉ đọc của giao diện Summarizer trả về định dạng văn bản mà các bản tóm tắt sẽ được trả về.

Giá trị

Một giá trị liệt kê chỉ định định dạng của các bản tóm tắt được trả về. Các giá trị có thể là:

markdown

Các bản tóm tắt chứa định dạng markdown (tuân theo đặc tả CommonMark).

plain-text

Các bản tóm tắt không chứa định dạng.

Ví dụ

js
const summarizer = await Summarizer.create({
  format: "plain-text",
  // ...
});

// Ghi log "plain-text"
console.log(summarizer.format);

Thông số kỹ thuật

Specification
Writing Assistance APIs
# dom-summarizer-format

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

Xem thêm