Issue with ready() method using jQuery 2.2.4 and Chrome 79

Issue with ready() method using jQuery 2.2.4 and Chrome 79

Having an issue using ready() method with 2.2.4 and Chrome 79 (worked w/ Chrome 78).

A change was made to restore form control state on finishing document parsing in Chrome.

If you use the example below, it gives a zero value when using 2.2.4 (but it works using 3.4.1).

Is it possible to patch 2.2.4 to get the same functionality as 3.4.1 or is that no longer worked on?

Select items in the dropdown and then navigate away from the page using the hyperlink and when returning to the page by pressing the browser back button the console should show a non-zero value.

  1. <html>
  2.     <head>
  3.         <title>Test Page</title>
  4.         <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
  5.         <!--script src="https://code.jquery.com/jquery-3.4.1.min.js"></script-->
  6.     </head>
  7.     <body>
  8.         <h1>Test Page</h1>
  9.         <select id="example" multiple>
                <option>Black</option>
                <option>Cyan</option>
                <option>Magenta</option>
                <option>Yellow</option>
            </select>
  10.         <a href="https://www.google.com/">Google</a>
  11.         <script type="text/javascript">
                $(function() {
                    console.log(document.querySelectorAll('#example option:checked').length);
                });
  12.         </script>
  13.     </body>
    </html>