News for hackers. Stuff that matters.
Re:A proposal to add signals to JavaScript by nurple on Sunday March 31, 2024 @03:55PM (#39887499)

  Welcome to Node.js v21.6.2.
  Type ".help" for more information.
  > window.dispatchEvent(new Event('counterChange'))
  Uncaught ReferenceError: window is not defined
Re:A proposal to add signals to JavaScript by runarberg on Sunday March 31, 2024 @04:05PM (#39887569)

    $ node
    Welcome to Node.js v20.6.1.
    Type ".help" for more information.
    > const target = new EventTarget()
    undefined
    > target.dispatchEvent(new Event("counterChange"))
    true
Re:A proposal to add signals to JavaScript by nurple on Sunday March 31, 2024 @04:37PM (#39887865)
tyvm!
Re:A proposal to add signals to JavaScript by extheat on Sunday March 31, 2024 @10:40PM (#39890389)
Even better on Node, you have EventEmitter. A much simpler interface.