From b97d812e6dde095b004d72465ed3f8837e46b96c Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Thu, 16 Jan 2025 18:30:52 +0530 Subject: [PATCH] Address review comments --- Lib/xml/dom/minidom.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index a32d4242a49..54e89cf06db 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -32,7 +32,9 @@ class Node(xml.dom.Node): - """Define properties accessible on a DOM node.""" + """Base class representing a node in the DOM tree. + Provides core properties and methods that all DOM nodes must implement. + """ namespaceURI = None # this is non-null only for elements and attributes parentNode = None ownerDocument = None @@ -84,11 +86,11 @@ def _get_lastChild(self): def insertBefore(self, newChild, refChild): """Insert a new DOM Node before an existing Node. - https://dom.spec.whatwg.org/#dom-node-insertbefore - The insertBefore(node, child) method, when invoked, - must return the result of pre-inserting node into - this before child. - See also https://dom.spec.whatwg.org/#concept-node-pre-insert + newChild + The new node to insert + refChild + The existing node that will be the next sibling of newChild. + If None, newChild is appended to the end. """ if newChild.nodeType == self.DOCUMENT_FRAGMENT_NODE: for c in tuple(newChild.childNodes):