Last comment on custom attribute with java script?
One answer
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript describes what you can get at. You can basically read attributes of the current work item. As far as I know comments are a non attribute based presentation backed up with storage. So you won't be able to, however, I can't check until next year.