Changes

Jump to: navigation, search

Implementing the Mouse Lock API in Firefox

13 bytes removed, 14:04, 3 December 2011
Tests
# "Mouse lock must succeed only if...the user-agent is the active application of the operating system" - '''johnno'''
# "The target of lock need not be in focus" - '''johnno'''
# <strikes>"Mouse lock must succeed only if the target is in the DOM tree"</strikes> - '''Anachid'''# <strikes>"If the target is removed from the DOM tree after mouse lock is entered then mouse lock will be lost."</strikes> - '''Anachid'''
# <s>"If the mouse is already locked to the same element, a repeated call to lock will succeed and the successCallback called"</s> - '''jboelen'''
# <s>"If another element is locked [and lock() is called] a user agent must transfer the mouse lock to the new target and call the mouselocklost callback for the previous target"</s> - '''jboelen'''
# "Events that require the concept of a mouse cursor must not be dispatched (for example: mouseover, mouseout)" - '''rhung'''
# "Movement and button presses of the mouse must not cause the window to lose focus" - '''asahota'''
# <s>"Synthetic mouse events created by application script act the same regardless of lock state" </s> - '''Tentacle'''
# "The unlock method cancels the mouse lock state" - '''abhatnagar1'''
# "[Upon unlock() t]he system mouse cursor must be displayed again and positioned at the same location that it was when mouse lock was entered (the same location that is reported in screenX/Y when the mouse is locked)" - '''dvillase'''
1
edit

Navigation menu