Adapted to latest viewjs version 0.4.0.