Skip to content

Instantly share code, notes, and snippets.

function allChildren(root) {
var node = root.firstChild;
var result = [];
var next;
while (node && node !== root) {
result.push(node);
next = node.firstChild || node.nextSibling;
// Forcing Opera full page reflow/repaint to fix page draw bugs
function forceOperaRepaint() {
if (window.opera) {
var bs = document.body.style;
bs.position = 'relative';
setTimeout(function() {
bs.position = 'static';
}, 1);
}
}