HTMLKit icon indicating copy to clipboard operation
HTMLKit copied to clipboard

Consider providing attribute initializers for elements where the attribute cannot be used elsewhere

Open tonyarnold opened this issue 2 years ago • 0 comments

As the title says, there are attributes where it could make sense to provide conveniences for setting them up, ie:

Form { }
  .method(…)

// versus

Form(method: …) { }

I'm not suggesting removing the .method(…) modifier, but if it always needs to be specified, it may be cleaner in use to allow specifying it at the point of creation. I'm sure there are other elements where this makes sense.

I'm also aware of the attributes parameter, but that provides no type-safety.

tonyarnold avatar Jun 30 '23 11:06 tonyarnold