Preact, like most other popular frameworks disallows passing stringified
JavaScript code as event handlers. We have one occurrence of that in our
doc search. The recent addition of including `preact/debug` during
server rendering in #1256 surfaced this problem.
This PR works around that by injecting a tiny script tag that attaches
the event handler. Basically only a slightly different approach than
before.