GNOME Bugzilla – Bug 791111
Modernise JS usage
Last modified: 2017-12-04 19:32:46 UTC
Javascript has evolved a fair bit since the code samples were written, so update them to reflect what we currently consider best practices.
Created attachment 364795 [details] [review] tour: Modernise JS usage As GJS was updated to use newer SpiderMonkey versions, it is now possible to use more modern language features and less non-standard modules such as Lang. Take advantage of that and update the code examples to follow the recommendations in ptomato's GUADEC talk[0]. [0] https://ptomato.wordpress.com/2017/07/30/modern-javascript-in-gnome-guadec-2017-talk/
Created attachment 364796 [details] [review] demos: Give JS samples the same treatment After updating the tour to use modern javascript patterns and coding style, go through all provided samples and update them to use arrow notation, Function.prototype.bind() and ES6 classes.
Review of attachment 364795 [details] [review]: Looks fine to me.
Review of attachment 364796 [details] [review]: Also seems fine.
Attachment 364795 [details] pushed as 351cbb2 - tour: Modernise JS usage Attachment 364796 [details] pushed as bc2b4a1 - demos: Give JS samples the same treatment