|
| 1 | +<!doctype html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="chrome=1"> |
| 6 | + <title>Josh.js by sdether</title> |
| 7 | + <link rel="stylesheet" href="stylesheets/styles.css"> |
| 8 | + <link rel="stylesheet" href="stylesheets/pygment_trac.css"> |
| 9 | + <script src="javascripts/respond.js"></script> |
| 10 | + <!--[if lt IE 9]> |
| 11 | + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
| 12 | + <![endif]--> |
| 13 | + <!--[if lt IE 8]> |
| 14 | + <link rel="stylesheet" href="stylesheets/ie.css"> |
| 15 | + <![endif]--> |
| 16 | + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
| 17 | + <link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'> |
| 18 | + <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"> |
| 19 | + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> |
| 20 | + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script> |
| 21 | + <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script> |
| 22 | +</head> |
| 23 | +<body> |
| 24 | +<div id="header"> |
| 25 | + <nav> |
| 26 | + <li><a href="index.html">Back to the Documentation</a></li> |
| 27 | + </nav> |
| 28 | +</div> |
| 29 | +<div class="wrapper"> |
| 30 | + |
| 31 | + <section> |
| 32 | + <h1>Josh.Readline</h1> |
| 33 | + |
| 34 | + <p><code>Josh.Readline</code> is the underlying plumbing responsible for all keystroke handling, bringing |
| 35 | + <a href="http://cnswww.cns.cwru.edu/php/chet/readline/readline.html">GNU Readline</a> like line editing to the browser. It is used by |
| 36 | + <code>Josh.Shell</code> to implement |
| 37 | + <em>bash</em>-like command prompt behavior, but could easily be wired up to any text box requiring advanced key handling. It has no dependencies on any outside libraries, although it does require either |
| 38 | + <code>Josh.History</code> and <code>Josh.Killring</code> or objects implementing the same calls.</p> |
| 39 | + |
| 40 | + <h2>Functions</h2> |
| 41 | + <p>When using <code>Josh.Shell</code> Readline is proxied for those calls that need to be exposed and otherwise invisible. The full API for readline is really only of interest for usage away from <code>Josh.Shell</code>.</p> |
| 42 | + |
| 43 | + <h3>new Josh.Readline(config)</h3> |
| 44 | + <h3>isActive()</h3> |
| 45 | + <h3>activate()</h3> |
| 46 | + <h3>deactivate()</h3> |
| 47 | + <h3>getLine</h3> |
| 48 | + <h3>onActivate(eventHandler)</h3> |
| 49 | + <h3>onDeactivate</h3> |
| 50 | + <h3>onChange</h3> |
| 51 | + <h3>onClear</h3> |
| 52 | + <h3>onEnter</h3> |
| 53 | + <h3>onCompletion</h3> |
| 54 | + <h3>onCancel</h3> |
| 55 | + <h3>onEOT</h3> |
| 56 | + <h3>onSearchStart</h3> |
| 57 | + <h3>onSearchEnd</h3> |
| 58 | + <h3>onSearchChange</h3> |
| 59 | + <h3></h3> |
| 60 | + <h3></h3> |
| 61 | + |
| 62 | + <h2>Internal Dependencies</h2> |
| 63 | + <h3>Josh.History</h3> |
| 64 | + <h3>Josh.Killring</h3> |
| 65 | + |
| 66 | + <h2>External Dependencies</h2> |
| 67 | + <p><em>None</em></p> |
| 68 | + </section> |
| 69 | +</div> |
| 70 | +<!--[if !IE]> |
| 71 | +<script>fixScale(document);</script><![endif]--> |
| 72 | + |
| 73 | +</body> |
| 74 | +</html> |
0 commit comments