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

Add docs for different h() algorithms #9

Closed
KazimirPodolski opened this issue Nov 14, 2018 · 5 comments
Closed

Add docs for different h() algorithms #9

KazimirPodolski opened this issue Nov 14, 2018 · 5 comments
Labels
🙋 no/question This does not need any changes

Comments

@KazimirPodolski
Copy link

There is no consistency with h() behavoiur:

  • virtual-hyperscript uses property attributes for attribues (and requires them to be kebab-case).
  • snabbdom uses property attrs for the same puprpose.
  • hyperscript?
  • whatever ancestor of hyperscript?

And all of them does not document anything. Actual behaviour is salvaged from experiment and issues.

It would be really nice if hastscript would document what is actual format of h() arguments. Sorry if I'm missing something and this all is false.

@wooorm
Copy link
Member

wooorm commented Nov 18, 2018

This is all true, but that’s exactly why this project is here: the deal with all those changes. You can find out about how they work, by reading their docs. This project just supports all their interfaces, but it’s not this project’s place to document those projects? 🤔

I’m not sure what you suggest to do, and I feel like this is not the place, so closing for now.

@wooorm wooorm closed this as completed Nov 18, 2018
@KazimirPodolski
Copy link
Author

It was not about documenting those projects, but about documenting hastscript. Another projects is just an example of inconsistent behaviour.

To be more clear, these things are not covered in hastscript docs and require experimenting and reading sources :

  • Classes in selector + classes in properties: how do they combine?
  • className seems to do classes in properties, however it is a property of a DOM element rather than HTML element.
  • camelCase vs kebab-case in properties names. Generally, does hastscript work with HTML elements or DOM elements?
  • SVG namespaces?
  • Any other special treatment of properties.

@wooorm
Copy link
Member

wooorm commented Nov 19, 2018

Oh whoops, I thought this issue was reported on hast-to-hyperscript, because you mentioned some other flavours. Sorry, I misread.

To find out more about all your points above, please click through to HAST, it’s a really well defined specification. It answers all your points.

I also remember there being a project to spec and stabilise all the different hyperscript-like interfaces, but can’t find it anymore unfortunately :(

@KazimirPodolski
Copy link
Author

There is an attempt to standardise hyperscript hyperhype/hyperscript#66 but it went nowhere.

Thanks, I'll check it out there.

@wooorm
Copy link
Member

wooorm commented Nov 19, 2018

Yeah I think there was some other repo as well, but I can’t find it anymore :(

@wooorm wooorm added the 🙋 no/question This does not need any changes label Aug 11, 2019
@wooorm wooorm changed the title Document h() arguments Add docs for different h() algorithms Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

2 participants