Skip to content

Commit

Permalink
* Works with snap 0.7
Browse files Browse the repository at this point in the history
* Dynload
  • Loading branch information
spockz committed Dec 12, 2011
1 parent 4708d70 commit 5c37d31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions resources/static/hjs/jcu.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ foreign import jscript "wrapper"
foreign import jscript "wrapper"
ioWrap :: IO () -> IO (JSFunPtr (IO ()))

-- dynLoad = do document <- HTML5.document
-- elem <- documentCreateElement document "script"
-- scriptTag' <- setAttr "src" scriptTag
dynLoad :: String -> IO ()
dynLoad src = do document <- HTML5.document
node <- HTML5.documentCreateElement document "script"
elementSetAttribute node "src" src
elementSetAttribute node "type" "text/javascript"


-- var fileref=document.createElement('script')
-- fileref.setAttribute("type","text/javascript")
Expand Down
2 changes: 1 addition & 1 deletion src/Application.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ makeLens ''App
type AppHandler = Handler App App

instance HasHdbc (Handler b App) Connection IO where
getConnSrc = with dbLens $ gets connSrc
getHdbcState = with dbLens get

jcu :: SnapletInit App App
jcu = makeSnaplet "jcu" "Prolog proof tree practice application" Nothing $ do
Expand Down

0 comments on commit 5c37d31

Please sign in to comment.