forked from mrlan/EnglishPal
BugFix407: fillword.js 在划新词后,会直接开始读新词(之前是会读完之前划的词后才开始读新词)
parent
b53e7031e5
commit
5a62204864
|
@ -15,6 +15,7 @@ function fillinWord(){
|
||||||
}
|
}
|
||||||
document.getElementById("text-content").addEventListener("click", fillinWord, false);
|
document.getElementById("text-content").addEventListener("click", fillinWord, false);
|
||||||
function read(s){
|
function read(s){
|
||||||
|
reader.cancel()
|
||||||
var msg = new SpeechSynthesisUtterance(s);
|
var msg = new SpeechSynthesisUtterance(s);
|
||||||
reader.speak(msg);
|
reader.speak(msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue