Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Added charLength and name to SpeechSynthesisEvent console.log #427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion speechsynthesis/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
const eventList = ['start', 'end', 'mark', 'pause', 'resume', 'error', 'boundary'];
eventList.forEach((event) => {
synUtterance.addEventListener(event, (speechSynthesisEvent) => {
log(`Fired '${speechSynthesisEvent.type}' event at time '${speechSynthesisEvent.elapsedTime}' and character '${speechSynthesisEvent.charIndex}'.`);
log(`Fired '${speechSynthesisEvent.type}' event named '${speechSynthesisEvent.name}' at time '${speechSynthesisEvent.elapsedTime}' and character '${speechSynthesisEvent.charIndex} of length '${speechSynthesisEvent.charLength}.`);
});
});

Expand Down