What is the "registry"? I don't really understand your question.
But I did look at your code, and I noticed something you need to fix.
You are using the "slim" build of jQuery, but you are using $.ajax(). The slim build does NOT include $.ajax()!
You will have gotten error messages on the Javascript console. Did you see them? You should always checks for errors on the Javascript console.
Either use the normal full build of jQuery, or rewrite your code to use the fetch() API built-in to modern browsers.