Feature detection and browser detection are almost standard practice in good web development now, but is it possible to do the opposite? Detect the features used on a website and/or codebase? The thought crossed my mind as I was reading the MDN page on feature detection and thought that I can't be the only one and I was right, but the only other one is this post and if you visit it, I hope you can see why this isn't helpful. Since the term for detecting if browsers are able to use features is called browser feature detection, I feel it fitting to call it website feature detection.
How would one go about website feature detection.
Before someone closes this question for being irrelevant since people will ask "why would you need to do this?" or "why not just do x" First of all, I don't think a question can't be asked because there isn't a stated real world use case for it yet, but to those who think they should:
- (Stated by ste2425 on the linked post) You've been given a large code base from a different team that was browser specific. You've been tasked with making it cross browser and want a quick overlook of the code to see how many occurrences of browser specific API's are being used.
- (Stated by markus on the linked post) In order to know what tests to add to modernizr you first need to know what features your codebase is using.
- General curiosity of what features a website or codebase uses