distribute JS class to layout.html.