Open
Conversation
|
fwiw I hit a similar constraint when trying to add additional event macros: https://github.com/dakom/dominator-helpers/blob/e1ec52fe658dae70c28f1db10dd89ce47b80b607/src/events.rs#L4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes quite a lot of
__internal_things onDomBuilder,StylesheetBuilder,ClassBuildervisible from outside.Why do I want this?
For example, instead of just doing
ClassBuilder::new().style("foo", "bar").finish(), I am forced to call the macro.Similarly, the
with_node!macro only works within ahtml!context, and not aDomBuilder::new_html("foo")....into_dom()ClassBuilderdocumentation it is unclear how to generate one; this could also be solved by documenting the macros, but that might better be served by exposing the methods and saying "You can also usewith_node!".This pull request also adds a
finish()method toDomBuilder, in order to make its api more similar toStylesheetBuilderandClassBuilder, which both are givenfinish()methods.