Screen Orientation API: Feedback

This is feedback for the draft located at
https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html

1) Per http://dev.w3.org/csswg/cssom-view/ Screen does not inherit
from EventTarget so dispatching events to it will not give you
anything meaningful. That should be fixed one way or another.

2) Rather than using sequence, the preferred way for creating an API
that takes a list is using a variadic:

  boolean lockOrientation(DOMString... orientations);

3) The algorithms end up dispatching events, however no task is
queued. That's a bug.

4) Rather than using DOMString, an enum should be used. This should
also simplify the algorithms somewhat (though beware that by using a
variadic no argument passed is a possibility).

5) An event handler attribute IDL definition should not have
"[TreatNonCallableAsNull]".


--
http://annevankesteren.nl/

Received on Sunday, 7 April 2013 04:39:30 UTC