DelegatedInkTrailPresenter: presentationArea property

Khả dụng hạn chế

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.

Thuộc tính chỉ đọc presentationArea của giao diện DelegatedInkTrailPresenter trả về Element mà trong đó việc hiển thị các nét mực bị giới hạn.

Nếu lệnh gọi phương thức Ink.requestPresenter() trước đó có bao gồm định nghĩa phần tử presentationArea cụ thể, thì đó sẽ là phần tử được trả về. Nếu không, mặc định được trả về, là viewport chứa.

Vùng này luôn là tọa độ client cho hộp viền của phần tử, vì vậy việc di chuyển hoặc cuộn phần tử không yêu cầu tính toán lại từ phía nhà phát triển.

Giá trị

Một Element.

Ví dụ

js
async function inkInit() {
  const ink = navigator.ink;
  const presenter = await ink.requestPresenter({ presentationArea: canvas });
  console.log(presenter.presentationArea);

  // …
}

Thông số kỹ thuật

Thông số kỹ thuật
Ink API
# dom-delegatedinktrailpresenter-presentationarea

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