Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Added the binding to go from a jQuery object to Array

  • Loading branch information...
commit 609f869d7a571fe5bb8b27beda44bc1ca514c45b 1 parent 25c2d13
@spockz spockz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 uhc-jscript/src/Language/UHC/JScript/JQuery/JQuery.hs
View
6 uhc-jscript/src/Language/UHC/JScript/JQuery/JQuery.hs
@@ -1,5 +1,6 @@
module Language.UHC.JScript.JQuery.JQuery where
+import Language.UHC.JScript.ECMA.Array (JSArray)
import Language.UHC.JScript.ECMA.String
import Language.UHC.JScript.Primitives
import Language.UHC.JScript.Types
@@ -53,7 +54,10 @@ foreign import jscript "jQuery.when(%*)"
when'' :: JSPtr a -> JSPtr a -> JSPtr a -> IO ()
-------------------------------------------------------------------------------
--- DOM
+-- Iteration
+
+foreign import jscript "jQuery.makeArray(%1)"
+ jQueryToArray :: JQuery -> IO (JSArray a)
foreign import jscript "%1.each(%2)"
each :: JQuery -> JSFunPtr (Int -> JSPtr a -> IO ()) -> IO ()
Please sign in to comment.
Something went wrong with that request. Please try again.