You can always detect whether tag <foo> is supported in JavaScript by testing whether HTLMFooElement is defined (but I understand you are speaking more generally).
I understand your feeling, and by making it usable without JavaScript you are already going a long way, but using those tags also makes your pages accessible.
Making your pages beautiful with animations is only extra. Things already work out of the box in any case without <details> without effort, only better if it is supported.
HTML is mostly designed to gracefully degrade, detection is not always necessary.
How would you like things to be handled? Handling retro compatibility is hard and I find HTML does a good job at it.