Docs: Difference between revisions
Appearance
| Line 12: | Line 12: | ||
!Functions Fired | !Functions Fired | ||
!Description | !Description | ||
!Example Usage | |||
!Related Code | !Related Code | ||
|- | |- | ||
| Line 17: | Line 18: | ||
|load | |load | ||
|w.emit("clientLoaded"); | |w.emit("clientLoaded"); | ||
|When the window is loaded, the client sends a "client loaded" event. This is currently not utilized. | |||
| | | | ||
| | |<syntaxhighlight lang="javascript" line="1" start="187"> | ||
window.addEventListener("load", function() { | |||
w.emit("clientLoaded"); | |||
}); | |||
</syntaxhighlight> | |||
|- | |- | ||
| | | | ||
|hash change | |hash change | ||
|manageCoordHash(); | |manageCoordHash(); | ||
| | |The URL hash is parsed and if it contains x,y coords then it will teleport the user to that location so long as the World and User models allow it. | ||
| | |https://ourworldoftext.com/#x:10,y:20 | ||
|<syntaxhighlight lang="javascript" line="1" start="5639"> | |||
window.onhashchange = function(e) { | |||
manageCoordHash(); | |||
} | |||
</syntaxhighlight> | |||
|- | |- | ||
| | | | ||
|before unload | |before unload | ||
|if(writeBuffer.length) flushWrites(); | |if(writeBuffer.length) flushWrites(); | ||
| | |||
| | | | ||
| | | | ||
| Line 35: | Line 47: | ||
|resize | |resize | ||
|event_resize | |event_resize | ||
| | |||
| | | | ||
| | | | ||
| Line 41: | Line 54: | ||
|select start | |select start | ||
|self | |self | ||
| | |||
| | | | ||
| | | | ||
| Line 51: | Line 65: | ||
* event_keydown_copy_color | * event_keydown_copy_color | ||
* event_keydown | * event_keydown | ||
| | |||
| | | | ||
| | | | ||
| Line 57: | Line 72: | ||
|key up | |key up | ||
|event_keyup | |event_keyup | ||
| | |||
| | | | ||
| | | | ||
| Line 66: | Line 82: | ||
* mousemove_linkAuto | * mousemove_linkAuto | ||
* event_mousemove | * event_mousemove | ||
| | |||
| | | | ||
| | | | ||
| Line 72: | Line 89: | ||
|mouse down | |mouse down | ||
|event_mousedown | |event_mousedown | ||
| | |||
| | | | ||
| | | | ||
| Line 78: | Line 96: | ||
|mouse up | |mouse up | ||
|event_mouseup | |event_mouseup | ||
| | |||
| | | | ||
| | | | ||
| Line 84: | Line 103: | ||
|mouse leave | |mouse leave | ||
|event_mouseleave | |event_mouseleave | ||
| | |||
| | | | ||
| | | | ||
| Line 90: | Line 110: | ||
|mouse enter | |mouse enter | ||
|event_mouseenter | |event_mouseenter | ||
| | |||
| | | | ||
| | | | ||
| Line 96: | Line 117: | ||
|touch start | |touch start | ||
|event_touchstart | |event_touchstart | ||
| | |||
| | | | ||
| | | | ||
| Line 102: | Line 124: | ||
|touch end | |touch end | ||
|event_touchend | |event_touchend | ||
| | |||
| | | | ||
| | | | ||
| Line 108: | Line 131: | ||
|touch move | |touch move | ||
|event_touchmove | |event_touchmove | ||
| | |||
| | | | ||
| | | | ||
| Line 116: | Line 140: | ||
* event_wheel | * event_wheel | ||
* event_wheel_zoom | * event_wheel_zoom | ||
| | |||
| | | | ||
| | | | ||
| Line 124: | Line 149: | ||
* keydown_tileProtectAuto | * keydown_tileProtectAuto | ||
* keydown_linkAuto | * keydown_linkAuto | ||
| | |||
| | | | ||
| | | | ||
| Line 130: | Line 156: | ||
|key up | |key up | ||
|onKeyUp | |onKeyUp | ||
| | |||
| | | | ||
| | | | ||
| Line 136: | Line 163: | ||
|cursor Move | |cursor Move | ||
|updateCoordDisplay | |updateCoordDisplay | ||
| | |||
| | | | ||
| | | | ||
| Line 142: | Line 170: | ||
|cursor Hide | |cursor Hide | ||
|updateCoordDisplay | |updateCoordDisplay | ||
| | |||
| | | | ||
| | | | ||
| Line 148: | Line 177: | ||
|tiles Rendered | |tiles Rendered | ||
|self | |self | ||
| | |||
| | | | ||
| | | | ||
| Line 154: | Line 184: | ||
|cursor Move | |cursor Move | ||
|setClientGuestCursorPosition | |setClientGuestCursorPosition | ||
| | |||
| | | | ||
| | | | ||
| Line 160: | Line 191: | ||
|cursor Hide | |cursor Hide | ||
|setClientGuestCursorPosition | |setClientGuestCursorPosition | ||
| | |||
| | | | ||
| | | | ||
| Line 170: | Line 202: | ||
* stabilizeTextInput | * stabilizeTextInput | ||
* event_input | * event_input | ||
| | |||
| | | | ||
| | | | ||
| Line 176: | Line 209: | ||
|context menu | |context menu | ||
|self | |self | ||
| | |||
| | | | ||
| | | | ||
| Line 182: | Line 216: | ||
|click | |click | ||
|self | |self | ||
| | |||
| | | | ||
| | | | ||