Subclass EditorView?

Is there any reason not to subclass EditorView? Asking because this issue was opened in use-prosemirror and I’m not sure if there’s any reason not to discourage subclassing EditorView.

That style of programming is antithetical to everything I stand for, but in this case I can’t think of any concrete problems it would produce, so sure, subclass away (I don’t think this is something that’s been done before though, so you might run into issues after all).

That style of programming is antithetical to everything I stand for

Me too, more or less… which is why I had hardwired new EditorView() in my library and never thought a person might want to subclass EditorView until someone opened that issue. Anyway, I now support the use-case, but will add a warning with a link to this issue. Thanks @marijn.

@marijn if you were me, would you not have supported this? As much as I agree with you regarding style (and I think it’s more than just style), “wontfix” just didn’t feel right for some reason in this case.

I don’t really see the point of doing this, and I don’t plan to go out of my way to make sure it is supported in ProseMirror, but as long as no actual issues are found I also don’t feel it’s worth forbidding that kind of subclassing.