_hyperscript
_hyperscript copied to clipboard
v0.9.7 - distributed script breaks in Safari
When using the script in/dist/
directly in the browser (via https://unpkg.com/[email protected]
), an error is thrown in Safari 14 and 15 breaking some (but not all) functionality.
This line throws an unexpected token error: https://github.com/bigskysoftware/_hyperscript/blob/054e04667497f204aff0a7ebfa5a1325a8adb277/dist/_hyperscript.js#L83
v0.9.5 was working previously.
(Disclaimer: I'm a complete _hyperscript newbie myself!)
I just ran into the same problem. It is caused by the fact, that older Safari versions do not support static
fields in classes.
As a consequence, I've forked the original code base and am now trying to "convert" the JS code into TypeScript, as that can produce JavaScript output which runs on older devices and browsers, but still offers modern JS features to the programmer.
Let us see if I succeed...
Well,
I may have fixed the problem. Could you please test it as well, just by using
<script src="https://unpkg.com/hyperscript-experimental"></script>
instead of the normal script file?
Reported again here https://github.com/bigskysoftware/_hyperscript/issues/369 -- sorry I missed this one. FWIW I concur with the analysis given above.
it seems still an issue w v0.9.8.
IMHO iOS 14 is not that old, last update was sep 2021. Apple's stats indicates ~8% iPhone and 13% iPad users are still running <= iOS/iPad 14.
It'll be great if this can be fixed soon.
Well,
I may have fixed the problem. Could you please test it as well, just by using
<script src="https://unpkg.com/hyperscript-experimental"></script>
instead of the normal script file?
Thanks for the great work here! I spot tested a few cases in my site, and it works well. Would you start a PR for your change?
I will try to get this fixed this week, sorry for the issue.