Wire up close & open actions in JavaScript

Change-Id: Iea295e667a3d10cf81b66a3d524f85e1b2db4673
Merge "Wire up close & open actions in JavaScript" into frontend-rewrite