Can't you use `document.documentElement` rather than creating a new element?