Proper use of nuxeo.js