(At least when PhantomJS doesn't crash...) (imported from commit 62936b12883e4c6bbd3701da80783b4bffe46025)