Not sure how they did it, you can convert scratch to HTML5 with Forkphorus: https://forkphorus.github.io/packager/.