Implementation of HTMLMainElement... third time lucky!