Mypal/dom/media/webspeech/synth/test/file_bfcache_frame.html

29 lines
786 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script type="application/javascript">
var frameUnloaded = function() {
var u = new SpeechSynthesisUtterance('hi');
u.addEventListener('end', function () {
parent.ok(true, 'Successfully spoke utterance from new frame.');
parent.onDone();
});
speechSynthesis.speak(u);
}
addEventListener('pageshow', function onshow(evt) {
var u = new SpeechSynthesisUtterance('hello');
u.lang = 'it-IT-noend';
u.addEventListener('start', function() {
location =
'data:text/html,<html><body onpageshow="' +
frameUnloaded.toSource() + '()"></body></html>';
});
speechSynthesis.speak(u);
});
</script>
</head>
<body>
</body>
</html>