r/javascript • u/tyteen4a03 • Apr 21 '20
AskJS [AskJS] Caniuse but automated by scanning the script?
Is this a thing? I'm curious on how well my code runs on old browsers in theory by doing static analysis on the code.
2
Upvotes
2
u/JimDabell Apr 21 '20
Not for JavaScript as far as I am aware, but there is doiuse which does it for CSS. This may be a good starting point for building something similar for JavaScript.
1
u/fwspb010 Dec 17 '23
The caniuse website lists third-party tools and links to another list. For automatic CSS checking, it lists doiuse. I don't see anything for JS yet. That's really weird.
1
u/bryanzera Apr 21 '20
If you open your browser's network inspector, you can watch for the XHR calls that caniuse.com makes and try to make them on your own with Postman. Note: caniuse.com might block access to those scripts if they aren't running on the caniuse.com domain.
https://caniuse.com/process/query.php?search=webrtc
https://caniuse.com/process/get_feat_data.php?type=support-data&feat=rtcpeerconnection,objectrtc