i could detect if `ownerDocument` is undefined here (which means, running with e10s enabled), and only run this new (slower) code then, but all this will be dead code in a few months, so might as well remove it now.