Skip to content

Instantly share code, notes, and snippets.

@freakingawesome
Created January 1, 2016 15:15
Show Gist options
  • Save freakingawesome/8baa9c0c83f6f9dbbfe5 to your computer and use it in GitHub Desktop.
Save freakingawesome/8baa9c0c83f6f9dbbfe5 to your computer and use it in GitHub Desktop.
<html>
<body>
<script type="text/javascript" src="Main.js"></script>
<script type="text/javascript">
var app = Elm.fullscreen(Elm.Main, {
scrollTop: document.body.scrollTop
});
window.onscroll = function () {
app.ports.scrollTop.send(document.body.scrollTop);
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment