p5.Element.prototype.child() and p5.Element.prototype.parent() should return p5.Element instance instead of returning HTML DOM node so that .show(), .hide() and other p5.Element functions can be called.
Current:
let btn = select("button");
new p5.Element(btn.parent()).hide();
Suggested:
let btn = select("button");
btn.parent().hide();
We won't be losing any functionality as DOM node can be accessed through btn.parent().elt.
Welcome! 馃憢 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
This is technically a breaking change so I wouldn't recommend changing the implementation at this point.
Most helpful comment
This is technically a breaking change so I wouldn't recommend changing the implementation at this point.