// Call this function whenever a comment is encountered onComment = (string s) { // Your code here // The passed parameter s does not include the opening <!-- nor // closing --> // // This is a a closure, so code here may reference // variables which are outside of this scope };
Register a handler which will be called whenever a comment is encountered.