SpeechSynthesisEvent: name property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2018.
Thuộc tính chỉ đọc name của giao diện SpeechSynthesisUtterance trả về tên liên kết với một số loại sự kiện xảy ra khi SpeechSynthesisUtterance.text đang được nói:
tên của điểm đánh dấu SSML được đạt tới trong trường hợp sự kiện mark, hoặc loại ranh giới được đạt tới trong trường hợp sự kiện boundary.
Giá trị
Một chuỗi.
Ví dụ
js
utterThis.onboundary = (event) => {
console.log(
`${event.name} boundary reached after ${event.elapsedTime} seconds.`,
);
};
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Web Speech API> # dom-speechsynthesisevent-name> |