3 ms·
Here you go, this is taken from production, copied from the browser's "view source" feature so there are a few dynamic values hard-coded (they're obvious, thoug
by ComputerGuru 4y ago
Here you go, this is taken from production, copied from the browser's "view source" feature so there are a few dynamic values hard-coded (they're obvious, though): https://gist.github.com/mqudsi/2f570cf58d7d293ba27217a308659dfe https://gist.github.com/mqudsi/2f570cf58d7d293ba27217a308659...
It's from a checkout page (the most important page where fancy JS isn't worth a single lost sale) so it goes to great pains to catch all errors and not be itself a source of JS errors. It intercepts errors and POSTs them to the server with a good-faith attempt at getting the browser, faulting script, line number, column number, error message, and stack trace.
It was actually in a <script> tag and not in an external js, but that shouldn't matter too much. You can see the comments and code to support actually ancient browsers (predating IE6 and Firefox 24).