hx-on unbound namespace in Jetbrains IDEs
I'm having issues with the hx-on attribute when working on html in Pycharm.
This only seems to be an issue with hx-on, every other attribute is fine.
Is there any easy fix to silence the IDE?
Looks like this needs to be added to the web-types file?
Looks like this needs to be added to the web-types file?
Probably, if you feel like investigating, a fix PR would be welcome! 😄
Other than that, looking at the highlighted error, there could be an issue with the attribute's syntax (as only hx-on seems to be underlined here and not the full attribute hx-on::after-settle), in which case you might want to try the trick mentioned in the docs:
Finally, in order to make this feature compatible with some templating languages (e.g. JSX) that do not like having a colon (:) in HTML attributes, you may use dashes in the place of colons for both the long form and the shorthand form:
<!-- These two are equivalent -->
<button hx-get="/info" hx-on-htmx-before-request="alert('Making a request!')">
Get Info!
</button>
<button hx-get="/info" hx-on--before-request="alert('Making a request!')">
Get Info!
</button>
Probably, if you feel like investigating, a fix PR would be welcome! 😄
I might give this a try at the weekend.
Finally, in order to make this feature compatible with some templating languages (e.g. JSX) that do not like having a colon (:) in HTML attributes, you may use dashes in the place of colons for both the long form and the shorthand form:
This is working for now, thanks.