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