[Bug] $x and global x produce different global variables

This issue has been tracked since 2022-07-26.

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 called x (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!

More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86


Issue Title Created Date Updated Date