appendChild method

  1. @override
Node appendChild(
  1. Node child
)
override

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);
}