What Erik said. This should and probably can easily be implemented on the server-side; there is enough JS already, and we have to keep caring at least slightly about the poor souls stuck on a ten-year-old computer.
While we're at it, and since we're on the design list: may I propose an alternative design? These icons do not at all fit with the rest of the page; there are only two other icons on the entire page, and both are very discreet – the person icons next to "Log in" and the search icon. Additionally, the "Edit" is too large; it's even slightly larger than the body text!
And here's the alternative, live on pl.wikipedia for years, since – I think – 2006: https://pl.wikipedia.org/wiki/Soulside_Journey . The links are placed next to the heading (like in your design), but keep the brackets and are noticeably smaller than body text. When I first started editing pl.wiki years ago (before I started perusing en.wiki regularly), I though it's the default – it just looked right :)
As you can see, this also gives us a natural way of adding an editsection link for the zeroth (heading) section, which seems to be another thing you guys were (or are?) working on.
The code is implemented as a gadget and could probably be easily integrated into MW core (https://pl.wikipedia.org/wiki/MediaWiki:Gadget-modify-section-style.js + https://pl.wikipedia.org/wiki/MediaWiki:Gadget-modify-section-style.css), but, as I said, this really should be done server-side. I'm all for improving through iteration; but I'm also all for doing things right the first time.
-- Matma Rex