Port controls to JavaScript

Signed-off-by: Byron Ruth <b@devel.io>