News for hackers. Stuff that matters.
Re:Replacing ‘that = this’ assignments in JavaScript with Ar... by j79 on Friday April 14, 2017 @06:47PM (#14118013)
It could get messy if you're doing stuff with Canvas, but I've used "ctx" in the past to denote the context change.
Re:Replacing ‘that = this’ assignments in JavaScript with Ar... by bjterry on Friday April 14, 2017 @09:31PM (#14118830)
'self' is also the global variable when you are in a WebWorker context, so it's sort of like overwriting 'window'. When you are in a window context 'self' is also identical with 'window' but people don't usually use it there.