You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the contrary, you should be able to augment Bolero.Builders.ElementBuilder with your own custom operators/keywords, following the same convention as for the built-in set. To provide type safety, i.e. where certain features are only available inside a given custom operator like in your example above, you will need extra sub-builder types and quite a bit of boilerplate code. Overall, not a whole lot of gain for a small improvement of notation, but if you do it well (with inlining, etc.) you might just make it more performant than ordinary function calls.
That said, I'd strongly advise against encoding HTML components in F# and use templating instead.
Looking at “Expanding Existing Computational Expressions” suggests to me that, say,
ElementBuilder
can be extended.Are the Bolero HTML Builder CEs open to this or do I need to learn more stuff about CEs?
instead of using function like this:
…we can do this:
…by extending
Bolero.Html
?The text was updated successfully, but these errors were encountered: