Re:A day without JavaScript
by SquareWheel on Thursday June 08, 2017 @01:55AM
(#14512204)
Do you have a reference to any of those tricks? Sounds interesting.
[ Parent
| on HN ]
You could use a link with a background-image
<style>.vote-42:active{ background-image: url(/api/vote/42) } </style> <a class="vote-42">Vote</a>
Re:A day without JavaScript
by SquareWheel on Thursday June 08, 2017 @03:56PM
(#14516744)
I ran a quick test. That actually seems to work, at least in Chrome. Very cool!
https://codepen.io/anon/pen/weMwRz
Realistically, I'd probably never use it because it's so dependent on browser behavior, but still a cool alternative.