Open R0NUT opened 1 year ago
@AlexWaygood What do I need to do to gain some traction with this? Have patience?
@AlexWaygood What do I need to do to gain some traction with this? Have patience?
I'm not an xml expert, so I can't comment much on whether the change is desirable. But it's much more likely to be accepted if you make a PR for the change! CPython is an open-source project that depends on the contributions of volunteers giving up their free time.
If you're new to CPython's workflow, we recommend having a skim through the devguide
That looks awesome! @R0NUT please open PR, can't wait for this to be added. Also I noticed that querySelector, getElementById and other get single element methods return NodeList but I think it would be more appropriate for them to return Node. EDIT: and closest returns one element before target.
Feature or enhancement
Proposal:
The Todo for xml.dom.minidom includes adding convenience methods for getting elements. I've created the following methods based on existing javascript functions. These include getElementById, getElementByName, getElementsByClassName, closest, querySelector, and querySelectorAll.
To implement, these helper functions should be added to the top level of the module.
These functions should be added to the NodeGet class.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/xml-dom-minidom-adding-convenience-methods-for-getting-elements/37140/1