[Pointer Lock] Few comments

Hi all,

few comments about the API

(1)
currently 
http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html uses 
VoidCallback which isn't defined anywhere.

I guess there should be something like

void lock (in Element target,
            optional in LockSuccessCallback successCallback,
            optional in LockErrorCallback failureCallback);


[Callback,NoInterfaceObject]
interface LockSuccessCallback {
   void pointerLockSuccess();
};

[Callback,NoInterfaceObject]
interface LockErrorCallback {
   void pointerLockFailure();
};

Or if the new proposed callback syntax is used:
callback LockSuccessCallback = void pointerLockSuccess();
callback LockErrorCallback = void pointerLockFailure();


(2)
"If another element is locked a user agent must transfer the mouse lock 
to the new target and call the pointerlocklost callback for the previous 
target."
There is no such thing as 'pointerlocklost callback'

(3)
"Mouse lock must succeed only if the window is in focus and the 
user-agent is the active application of the operating system"
What window? window object as in web page? Or OS level window?
What if lock is called in some iframe?

(4)
"If the target is removed from the DOM tree after mouse lock is entered 
then mouse lock will be lost."
Should 'pointerlocklost' event be dispatched?




-Olli

Received on Thursday, 15 December 2011 14:20:00 UTC