1 parent b7a0d25 commit cb87678Copy full SHA for cb87678
1 file changed
js/speech-shortcode.js
@@ -5,7 +5,7 @@ document.addEventListener( "DOMContentLoaded", function( event ) {
5
speeches[ i ].addEventListener( 'click', function() {
6
var voice = this.getAttribute( 'data-voice' );
7
8
- var synthes = new SpeechSynthesisUtterance( this.innerText );
+ var synthes = new SpeechSynthesisUtterance( this.textContent );
9
synthes.lang = this.getAttribute( 'data-lang' );
10
var voices = speechSynthesis.getVoices();
11
voices.forEach( function( v, i ) {
0 commit comments