_hyperscript
_hyperscript copied to clipboard
[Bug] $x and global x produce different global variables
It would surprise me if the following behaviour would have been intended:
set $x to ...
creates a global JavaScript variable called$x(which is a good idea as this reduces the probability of name collisions)set global x to ...
creates a global JavaScript variable calledx(which is really dangerous as it could collide with already existing global names)
As there are two different global variables it becomes important to know how a global variable has been created, i.e., $x and global x can not be mixed - you cannot choose the variant which "reads better" in your current situation (which is emphasized so often within the docs)
Additionally, these side-effects in the global JavaScript namespace should definitely be mentioned in the docs!