_hyperscript icon indicating copy to clipboard operation
_hyperscript copied to clipboard

[Bug] homepage demo on macOS Safari results in "undefined" copied to clipboard

Open aehlke opened this issue 3 years ago • 2 comments

Safari on macOS Monterey, when I use the demo on this project's homepage and click the "Copy" button, the result is "undefined" showing up in my clipboard instead of any innertext as expected.

aehlke avatar Jul 28 '22 22:07 aehlke

(disclaimer: I'm a complete _hyperscript newbie and may therefore be terribly wrong)

It seems that there is no HTML element with the id 'snippet' which is why there is also no innerText - actually, the example demonstrates the "null safety" (and its potential drawbacks) quite well.

Just changing #snippet to #sample should "repair" the example (as it has the id "sample" itself)

rozek avatar Jul 29 '22 05:07 rozek

I've just fixed the documentation source (and created a pull request) - but right now, I don't know how to build the docs.

We will thus have to wait for the author to finally fix this problem.

rozek avatar Jul 29 '22 05:07 rozek