testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.scripts.html
author Andreas Pehrson <apehrson@mozilla.com>
Thu, 01 Dec 2022 13:21:38 +0000
changeset 644305 4ec5232d1c53adc904757703336402e02f10ee01
parent 415317 004007aee1cc4eb42dbed6cf0834170f4f523c82
permissions -rw-r--r--
Bug 1803368 - Reinstate frame dropping. r=webrtc-reviewers,mjf The plumbing for this was broken in https://hg.mozilla.org/mozilla-central/rev/19f5dc65c5c2c5836b6ac78e6b7890d179fc820e Differential Revision: https://phabricator.services.mozilla.com/D163473

<!doctype html>
<meta charset=utf-8>
<title>Document.scripts</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
  var scripts = document.scripts;
  assert_true(scripts instanceof HTMLCollection);
  assert_equals(scripts.length, 3);

  var script = document.createElement("script");
  document.body.appendChild(script);
  assert_equals(scripts.length, 4);

  document.body.removeChild(script);
  assert_equals(scripts.length, 3);
}, "Document.scripts should be a live collection");
</script>