Replies: 1 comment
-
Thanks for starting a conversation about this, and sorry for not replying sooner! These kinds of APIs could definitely be useful, and could even be introduced outside the library as helper extensions, if you're willing to give it a try! I'm going to convert to a discussion, where things can be discussed a bit further, so issues can remain a space for bug reports. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Other than
Node.isEmpty()
andNode.append()
, we don't really have any way to manipulate the tree ofNode
objects in the swift-html library.I would like to suggest that we have a number of functions that are similar to DOM manipulation operations available in JavaScript and other languages.
The current structure of the
Node
(especially with the copious use of the "fragment") makes it difficult to dig in and make manipulations to the nodes. So adding a familiar API layer to this will make it easier to build a web document out of Nodes.For instance:
Beta Was this translation helpful? Give feedback.
All reactions