Lusito / tsx-dom

Lightweight DOM Libraries
https://lusito.github.io/tsx-dom/
MIT License
49 stars 17 forks source link

Add missing HTML attributes #24

Closed danielhjacobs closed 3 months ago

danielhjacobs commented 3 months ago

See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocorrect

Lusito commented 3 months ago

Thanks for the pull request. autocorrect is a non-standard property (safari only), so I wouldn't want to add that to the library by default. I will make it easier to extend properties that are non-standard or still missing in tsx-dom-types.

So if you remove the autocorrect from this PR, I can merge it. Otherwise I'll add that change with a new approach soon anyway.

danielhjacobs commented 3 months ago

Ok, I'll remove it, though I wonder why https://github.com/whatwg/html/pull/5841 was never merged.

danielhjacobs commented 3 months ago

Removed.

danielhjacobs commented 3 months ago

~Keep in mind, as noted following the suggestion in #22, currently if I try to extend the type definitions of the tsx-dom-types module it disables type checking altogether.~

Lusito commented 3 months ago

thanks. I'm still looking into the issues in #22

danielhjacobs commented 2 months ago

I refreshed the initiative to standardize autocorrect: https://github.com/whatwg/html/pull/5841. Anne van Kesteren says "I think this is ready now".

Mozilla bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1725806

Chromium bug is https://issues.chromium.org/issues/40871769

I don't know what your opinion is on if/when you want to support it after it becomes part of the Whatwg standard (e.g. if you want to wait for at least one other browser to support it).

danielhjacobs commented 2 months ago

autocorrect is a non-standard property (safari only), so I wouldn't want to add that to the library by default.

Not sure what your perspective is on when you'd want to add this to this package, but see https://github.com/mdn/content/issues/35593 and https://github.com/whatwg/html/pull/5841#issuecomment-2295854067. After that whatwg PR is merged, this will be standardized. Also, apparently despite what MDN says, https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/ime/input_method_controller.cc;l=1711-1716;drc=f83b758b5980e3fb3eafa11bab38116206907459 seems to imply this is implemented in Chromium already.