Created
November 30, 2014 08:46
-
-
Save techtangents/bae37321805a9d600232 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
measureInner :: forall eff. JQuery -> Eff (dom :: DOM | eff) Size | |
measureInner jq = | |
size <$> innerWidth jq <*> innerHeight jq | |
foreign import innerWidth | |
""" | |
function innerWidth(ob) { | |
return function () { | |
return ob.innerWidth(); | |
}; | |
} | |
""" :: forall eff. JQuery -> Eff (dom :: DOM | eff) Number | |
foreign import innerHeight | |
""" | |
function innerHeight(ob) { | |
return function () { | |
return ob.innerHeight(); | |
}; | |
} | |
""" :: forall eff. JQuery -> Eff (dom :: DOM | eff) Number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment