Change some spec functions and depend on DOM from elsewhere.