@override Node removeChild(Node child) { if (documentElement == child) { documentElement = null; } return super.removeChild(child); }