An attempt at porting LW5 to HTML5.