packages feed

hplayground 0.1.2.4 → 0.1.2.5

raw patch · 2 files changed

+10/−5 lines, 2 files

Files

hplayground.cabal view
@@ -1,5 +1,5 @@ name: hplayground
-version: 0.1.2.4
+version: 0.1.2.5 
 cabal-version: >=1.8
 build-type: Simple
 license: BSD3
src/Haste/HPlay/View.hs view
@@ -40,7 +40,7 @@ inputSubmit, wbutton, wlink, noWidget, stop,wraw, isEmpty
 
 -- * out of flow updates
-,at, UpdateMethod(..)
+,at,at', UpdateMethod(..)
 
 -- * Session data storage
 ,getSessionData,getSData,setSessionData,setSData
@@ -1262,9 +1262,14 @@ 
 -- | Run the widget as the content of the element with the given id. The content can
 -- be appended, prepended to the previous content or it can be the only content depending on the
--- update method.
-at ::  String -> UpdateMethod -> Widget a -> Widget  a
-at id method w= View $ do
+-- update method.+at ::  String -> UpdateMethod -> Widget a -> Widget  a+at ident= at' ('#':ident)++-- A generalized version of `at` that include the widget rendering at the elements that meet the selector criteria+-- (the first parameter) in the style of jQuery. the selector can match  classes etc not only identifiers.
+at' ::  String -> UpdateMethod -> Widget a -> Widget  a
+at' id method w= View $ do
  FormElm render mx <- (runView w)
  return $ FormElm  (set  render)  mx
  where