| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Fullscreen and Mouse Lock Scripts</title> | 4 <title>Fullscreen and Mouse Lock Scripts</title> |
| 5 <style type="text/css"> | 5 <style type="text/css"> |
| 6 #HTMLCursor { | 6 #HTMLCursor { |
| 7 border: solid black 1px; | 7 border: solid black 1px; |
| 8 background: yellow; | 8 background: yellow; |
| 9 display: inline; | 9 display: inline; |
| 10 position: absolute; | 10 position: absolute; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 | 130 |
| 131 function moveHTMLCursorBy(x, y) { | 131 function moveHTMLCursorBy(x, y) { |
| 132 moveHTMLCursorTo( | 132 moveHTMLCursorTo( |
| 133 HTMLCursor.getBoundingClientRect().left + parseInt(x), | 133 HTMLCursor.getBoundingClientRect().left + parseInt(x), |
| 134 HTMLCursor.getBoundingClientRect().top + parseInt(y)); | 134 HTMLCursor.getBoundingClientRect().top + parseInt(y)); |
| 135 } | 135 } |
| 136 | 136 |
| 137 var polyFillMouseEventMovementFromVenderPrefix = function (e) { | 137 var polyFillMouseEventMovementFromVenderPrefix = function (e) { |
| 138 e.movementX = (e.movementX !== undefined ? e.movementX : | 138 e.movementX = (e.movementX !== undefined ? e.movementX : |
| 139 (e.webkitMovementX !== undefined ? e.webkitMovementX : | |
| 140 (e.mozMovementX !== undefined ? e.mozMovementX : | 139 (e.mozMovementX !== undefined ? e.mozMovementX : |
| 141 (e.oMovementX !== undefined ? e.oMovementX : | 140 (e.oMovementX !== undefined ? e.oMovementX : |
| 142 e.msMovementY)))); | 141 e.msMovementY))); |
| 143 e.movementY = (e.movementY !== undefined ? e.movementY : | 142 e.movementY = (e.movementY !== undefined ? e.movementY : |
| 144 (e.webkitMovementY !== undefined ? e.webkitMovementY : | |
| 145 (e.mozMovementY !== undefined ? e.mozMovementY : | 143 (e.mozMovementY !== undefined ? e.mozMovementY : |
| 146 (e.oMovementY !== undefined ? e.oMovementY : | 144 (e.oMovementY !== undefined ? e.oMovementY : |
| 147 e.msMovementY)))); | 145 e.msMovementY))); |
| 148 } | 146 } |
| 149 | 147 |
| 150 var clicked_elem_ID = "" | 148 var clicked_elem_ID = "" |
| 151 function clickElement(id) { | 149 function clickElement(id) { |
| 152 clicked_elem_ID = id; | 150 clicked_elem_ID = id; |
| 153 } | 151 } |
| 154 | 152 |
| 155 function init() { | 153 function init() { |
| 156 moveHTMLCursorToCenter(); | 154 moveHTMLCursorToCenter(); |
| 157 | 155 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 onclick="clickElement(this.id);"> | 230 onclick="clickElement(this.id);"> |
| 233 anchor link | 231 anchor link |
| 234 </a> | 232 </a> |
| 235 navigates to an anchor on this page. The browser should not exit tab | 233 navigates to an anchor on this page. The browser should not exit tab |
| 236 fullscreen or mouse lock.</p> | 234 fullscreen or mouse lock.</p> |
| 237 </div> | 235 </div> |
| 238 <p>This text is outside of the container that is made fullscreen. This text | 236 <p>This text is outside of the container that is made fullscreen. This text |
| 239 should not be visible when fullscreen.</p> | 237 should not be visible when fullscreen.</p> |
| 240 </body> | 238 </body> |
| 241 </html> | 239 </html> |
| OLD | NEW |