tenfourfox/layout/reftests/css-ruby/dynamic-removal.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

15 lines
391 B
JavaScript

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.parentNode.removeChild(e);
});
getElements('remove-after').forEach(function(e) {
e.parentNode.removeChild(e.nextSibling);
});
};