Adding Errors with JS

What part of your page is calling your Snippet? e.g. is this a Wizard Step button, or a Page Title button, or a custom field renderer, or a Row Action?