News for hackers. Stuff that matters.
Re:_hyperscript: A jQuery and JavaScript Alternative by bobbylarrybobby on Wednesday April 21, 2021 @05:51PM (#26895912)
Won't the arrow function not bind `this` to the DOM element, causing it to refer to the window object? I think you have to use a real `function`, `function(){this.remove()}`
Re:_hyperscript: A jQuery and JavaScript Alternative by deniz-a on Thursday April 22, 2021 @05:54AM (#26900783)
Arrow functions have the same `this` as the scope where they are declared (in this case, an onclick attribute). Both would work in this case.