Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node vs. Leaf elements #13

Open
epost opened this issue May 16, 2019 · 1 comment
Open

Node vs. Leaf elements #13

epost opened this issue May 16, 2019 · 1 comment

Comments

@epost
Copy link

epost commented May 16, 2019

Problem

Example case: circle is a leaf:

circle :: forall p i. Leaf I.SVGcircle p i
circle props = element (ElemName "circle") props []

However, in the general case, I think in general it ought to be a node, for example when we need to store animation attributes in it.

I have been using the following alternative for that:

circleNode :: forall p i. Node I.SVGcircle p i
circleNode = element (ElemName "circle")

There are more elements like this.

Question

Should we turn such elements into Node, perhaps providing compatibility wrappers like the following?

circle props = circleNode props []
srghma added a commit to srghma/purescript-halogen-svg that referenced this issue Jul 31, 2020
srghma added a commit to srghma/purescript-halogen-svg that referenced this issue Jul 31, 2020
@srghma
Copy link

srghma commented Jul 31, 2020

I think the correct way is to make it a Node but default

added 3f50d56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants