Not really..., neither memory leaks, nor missing the addition of event handling to newly added DOM elements is a problem for the addEventListener solution.
If the codebase is using JSON submitted forms almost everywhere, it's easier to build that feature more declaratively, by adding support for a special enctype attribute value (using one global addEventListener that would handle it), for example:
<form enctype="application/json"> ...
That would be more in line with how other features of the <form> element work.
addEventListener solution is also better if you decide to add CSP in the future.
Not really..., neither memory leaks, nor missing the addition of event handling to newly added DOM elements is a problem for the addEventListener solution.
If the codebase is using JSON submitted forms almost everywhere, it's easier to build that feature more declaratively, by adding support for a special enctype attribute value (using one global addEventListener that would handle it), for example:
That would be more in line with how other features of the <form> element work.addEventListener solution is also better if you decide to add CSP in the future.