summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-ruby/support/ruby-dynamic-removal.js
blob: c703e7601e4f3a84e7d7739baf5841e16a46e3f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function getElements(className) {
  return Array.from(document.getElementsByClassName(className));
}
window.onload = function() {
  // Force a reflow before any changes.
  document.body.clientWidth;

  getElements('remove').forEach(function(e) {
    e.remove();
  });
  getElements('remove-after').forEach(function(e) {
    e.parentNode.removeChild(e.nextSibling);
  });
};