Try It Editor
Tip: Press
Ctrl/⌘ + Enter
to Run
▶ Run
Reset
Copy
Download
Code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Feature Detect (not UA sniff)</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </head> <body> <pre id="out"></pre> <script> var supportsFetch = !!window.fetch; $("#out").text("fetch supported? " + supportsFetch); </script> </body> </html>
Output