Inserts a node-style JavaScript callback function, and ensures that the call's trailing semicolon is inserted.