Everything is correct except the fact that the behavior does not show on the page.
The forms[0] reference is because we started to refer to forms by index instead of by value. It makes it so you don't have to update the server behaviors if you change the form name and allows it to work with unnamed forms.
The fact that the behavior cannot be edited is a bug that I will log.