Implementation of HTMLMainElement

Attempt 2... hopefully all good now.