gecko/layout/reftests/css-ruby/dynamic-removal.js
Xidorn Quan 410f8ca154 Bug 1087872 - Tests for dynamic change of ruby frames. r=bz,dbaron
--HG--
extra : rebase_source : 4fa97f21d33e96bfc6bf8456f7ce8983e1fedee2
extra : amend_source : 5c80d0ded3816655b8f05ef44f496b2a991d6940
extra : source : ea286aab916d2a35b4a08dc808667c78d4142968
2014-12-10 16:23:21 +11: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);
});
};