blob: c8663b7fb0b12fc364ade35e48003850c868c442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<!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>
|