What happens when javascript fails?

What happens when javascript fails?

First off, I'm quite new to javascript and jquery. But in the past couple months I've come a long ways.

My question is basically this:

I've got an onload event setup on my body, which uses the PerformanceTiming features to log certain data. My understanding is PerformanceTiming only works with browsers supporting HTML5

What happens is a clients browser does not support HTML5?

Will it stop executing javascript once it hits the unrecognized code? What about the execution of different  javascript at a later point in the page life?

Basically I need to know if it's safe to use this code, when I know for sure certain machines won't be able to make sense of it.

My code is structured like this:

  1. <script type="text/javascript">
  2.     
  3.         var t = performance.timing;
  4.         var kbytes;
  5.         var networkLatency;
  6.         var browserRenderTime;
  7.         var totalTime;

  8.         // Gets hit 1st
  9.         $(document).ready(
  10.             function () {
  11.                 var pagebytes = $('html').html().length;
  12.                 kbytes = pagebytes / 1024;
  13.                 $('#Div4').text('Page Size = ' + kbytes.toFixed(0) + 'Kb');
  14.             }
  15.         );

  16.         // Gets hit 2nd
  17.         var startTime = new Date().getTime();
  18.         function onLoadEventHandler() {
  19.             networkLatency = t.responseEnd - t.fetchStart;
  20.             $('#Div1').text('Network latency = ' + networkLatency + 'ms');
  21.         }

  22.         // Gets hit 3rd
  23.         $(window).load(function () {
  24.             setTimeout(function () {
  25.                 browserRenderTime = t.loadEventEnd - t.responseEnd;
  26.                 totalTime = t.loadEventEnd - t.navigationStart;
  27.                 $('#Div2').text('The time taken for client machine to render page = ' + browserRenderTime + 'ms');
  28.                 $('#Div3').text('The whole process = ' + totalTime + 'ms');

  29.                 var data = kbytes.toFixed(0);
  30.                 data += "|" + $('#DivServerExecutionTime').text();
  31.                 data += "|" +  networkLatency;
  32.                 data += "|" +  browserRenderTime;
  33.                 data += "|" + totalTime;
  34.                 data += "|" + (screen.width + " x " + screen.height);
  35.                 data += "|" + window.location;

  36.                 $.ajax({
  37.                     type: 'POST',
  38.                     url: "/handlers/PageloadSpeeds.ashx",
  39.                     cache: false,
  40.                     data: data
  41.                 });

  42.             }, 0);
  43.         });

  44.     </script>