- From: Satish S <satish@google.com>
- Date: Wed, 2 Nov 2011 21:08:14 +0000
- To: Michael Bodell <mbodell@microsoft.com>
- Cc: "public-xg-htmlspeech@w3.org" <public-xg-htmlspeech@w3.org>, "johnston@research.att.com" <johnston@research.att.com>
- Message-ID: <CAHZf7RnSAiuaC55f0dgDfbxdawpkRbg2RsAzSU-cZzs6uHpxDA@mail.gmail.com>
Some comments based on reviewing the latest document:
API related:
1. SpeechInputRequest.outputToElement() should be an attribute, perhaps
'forElement'?
2. SpeechInputResult has a getter "item(index)". SpeechInputResultEvent
has an array "SpeechInputResult[] results. Can we change both to be
collections similar to
http://www.w3.org/TR/FileAPI/#dfn-filelist(accessible via [] operator
and optionally with a .item() method)?
3. The <reco> element should probably be a void element with no content
on its own (http://dev.w3.org/html5/spec/Overview.html#void-elements)
Minor corrections in sample code:
1. "Speech Web Search JS API With Functional Binding" sample should
probably use a custom pattern for the 'q' input element so that it is clear
why .addGrammarFrom() is used.
2. In the same example, can we show a .onresult handler which
auto-submits the form?
3. In sample "Speech Web Search JS API Only", simpler to say
"sir.grammars = [ g, g1, g2, g3 ];" instead of assigning them one by one?
4. "var f = document.getElementById('f');f.submit();" can be replaced
with "document.forms[0].submit();"
5. "sir.onnomatch() = function" should be "sir.onnomatch = function"
6. In the samples where we access the 0-th index of results, we should
check for length before doing so.
7. We should probably use <input> and not <input /> in the doc as in
HTML the input tag has no end tag.
Cheers
Satish
On Sat, Oct 29, 2011 at 6:31 AM, Michael Bodell <mbodell@microsoft.com>wrote:
> Only changes other than date and last document link are more examples.
>
>
>
> This time there are two more examples which show two ways to use the JS
> API. Neither takes advantage of an earlier open (like onload="sir.open()"
> to get permisions and early grammar usage), but both should work and show
> some of the JS api work that should help others with their examples for
> before the F2F.
>
Received on Wednesday, 2 November 2011 21:08:43 UTC