Allow document to be passed to setupComponent