clone of boundary html5 from author Matt King