Permalink
Browse files

Re-order some code

  • Loading branch information...
1 parent 295b03b commit 0b38baa5ea3e0a0a2584ed7c58b78603596bedbc @norm2782 norm2782 committed Nov 29, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 EHC/text/TopicJavaScriptIFL.cltex
@@ -647,24 +647,24 @@ handler to all input fields retrieved by our jQuery selector.
%TODO: Rewrite the bit above?
-\begin{figure}
+\begin{figure}[ht]
\begin{code}
data JQueryPtr
type JQuery = JSPtr JQueryPtr
-foreign import js "%1.bind(%*)"
- bind :: JQuery -> JSString -> JEventHandler -> IO ()
-
type ThisEventHandler = JQuery -> JQuery -> JEventResult
type JEventHandler = JSFunPtr (JQuery -> JEventResult)
type JThisEventHandler = JSFunPtr ThisEventHandler
-valString :: JQuery -> IO String
-mkJThisEventHandler :: ThisEventHandler -> IO JThisEventHandler
+foreign import js "%1.bind(%*)"
+ bind :: JQuery -> JSString -> JEventHandler -> IO ()
foreign import js "wrappedThis(%1)"
wrappedThis :: JThisEventHandler -> IO JEventHandler
+valString :: JQuery -> IO String
+mkJThisEventHandler :: ThisEventHandler -> IO JThisEventHandler
+
bindInput = do
let alertHndlr :: ThisEventHandler
alertHndlr this _ = valString this >>= alert

0 comments on commit 0b38baa

Please sign in to comment.