SpeechSynthesisUtterance : EventTarget, and EventHandler

I propose the adding ": EventTarget" and substituting "Function" with
"EventHandler" in the SpeechSynthesisUtterance as follows. I don't believe
this has any effect on the intended functionality, but EventTarget is
required for valid IDL, and EventHandler adds clarity in that it references
the standard HTML classes and their handling of non-callable functions and
diverse returns.

    interface SpeechSynthesisUtterance : EventTarget {
      ...
      attribute EventHandler onstart;
      attribute EventHandler onend;
      attribute EventHandler onerror;
      attribute EventHandler onpause;
      attribute EventHandler onresume;
      attribute EventHandler onmark;
      attribute EventHandler onboundary;
    };

For the same reasons, I propose substituting "Function" with "EventHandler"
in the SpeechRecognition interface as follows...

    interface SpeechRecognition : EventTarget {
        ...
        attribute EventHandler onaudiostart;
        attribute EventHandler onsoundstart;
        attribute EventHandler onspeechstart;
        attribute EventHandler onspeechend;
        attribute EventHandler onsoundend;
        attribute EventHandler onaudioend;
        attribute EventHandler onresult;
        attribute EventHandler onnomatch;
        attribute EventHandler onerror;
        attribute EventHandler onstart;
        attribute EventHandler onend;
    };

Also, to clarify the comment at the top of section "5.2.4
SpeechSynthesisUtterance Events" I propose substituting the current sentence
    "The SpeechSynthesisEvent event parameter is supplied for each of these
events."
with
    "Each of these events MUST use the SpeechSynthesisEvent interface."


If there's no disagreement, I will update the spec with this on Tuesday.
Glen Shires

Received on Sunday, 14 October 2012 04:14:30 UTC