Issue 5336: HTMLCollection object is undefined in the Script panel

Steps to reproduce

  1. Enabled the Script panel, reload this page
  2. Click this button
  3. Check the Watch panel, there should be a variable elements with value: [div.test, div.test]