Skip to content

Conversation

@robb
Copy link
Owner

@robb robb commented May 3, 2022

This adds a dedicated AttributeKey type and allows any Hashable value as an attribute value.

The idea being that this allows for safe storage of arbitrary data inside a node.

  • raw keys are meant for well-defined HTML attributes.
  • scoped keys should represent user-defined keys like data- or ng-.
  • .ephemeral keys are for associating short-lived data with elements, e.g. to tag them while passing them through middleware. .ephemeral will never be serialized.

Closes #28

@robb
Copy link
Owner Author

robb commented May 3, 2022

I guess what we want for values is AnyTextOutputStreamable, there isn't really a Hashable requirement…

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

Successfully merging this pull request may close these issues.

2 participants