Re:ShowHN: Htmz – a low power tool for HTML
by simplify on Monday February 19, 2024 @12:07PM
(#39432090)
Understanding or not, certain decisions like overriding the semantic meaning of a hash in a url doesn't seem to be working with the platform. A better version would be adding a target to a `data-` attribute.
It's a fun project overall, though.
Re:ShowHN: Htmz – a low power tool for HTML
by sam2426679 on Monday February 19, 2024 @01:30PM
(#39433052)
OP addresses this at “We can do a hack that enables you to write the target ID selector in the target attribute itself!”
Re:ShowHN: Htmz – a low power tool for HTML
by simplify on Monday February 19, 2024 @01:35PM
(#39433114)
I'm only addressing the comment on "a glorious demonstration" of understanding the platform, where hacks like this go against such a take (IMO)
Re:ShowHN: Htmz – a low power tool for HTML
by neoberg on Monday February 19, 2024 @06:14PM
(#39435985)
I'd say hacking the platform in a way that's elegant like this would require a certain level of understanding of it,
Re:ShowHN: Htmz – a low power tool for HTML
by mirekrusin on Monday February 19, 2024 @04:38PM
(#39435119)
Just use target, if it starts with #, it's replacement, otherwise behaves as is.
Re:ShowHN: Htmz – a low power tool for HTML
by yawaramin on Tuesday February 20, 2024 @01:55AM
(#39438677)
But the hash doesn't have a semantic meaning when it is in an href or action attribute, because it is stripped out before the request is sent to the server. The hash only has a meaning when it's in the URL bar. That's kinda the point of this hack.
I don't expect I would ever use it, but I think it's excellent.