appendChild method
Implementation
@override
Node appendChild(Node child) {
if (child is Element) {
documentElement ??= child;
} else {
throw UnsupportedError('Only Element can be appended to Document');
}
return super.appendChild(child);
}