Thank you for the feedback.

The error is: "document.body does not yet exist"
Maybe, it should be added to a page's <head> then. Please clarify are you able to reproduce it with the test case that you provided or it is reproducible with another?