Skip to content

Instantly share code, notes, and snippets.

@techtangents
Created November 30, 2014 08:46
Show Gist options
  • Save techtangents/bae37321805a9d600232 to your computer and use it in GitHub Desktop.
Save techtangents/bae37321805a9d600232 to your computer and use it in GitHub Desktop.
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