mw.loader.using( 'ext.pollNY.lightBox', function() { LightBox.init(); } );
((Any other code using LightBox.* should probably do the same thing, athough mw.loader.using is using jQuery's "promises" (I really want to call this something else, since jQuery doesn't implement proper promises) incorrectly so I'm not sure how well that will work))
That's difficult to read with the multiple levels of nesting with parenthesis.
1) jQuery's promises are not compatible with Promises/A+ or ES6 promises spec. ** How is this relevant? 2) mw.loader.using promises incorrectly? ** How? Is there a bug report? What issues does it cause?
Also [1], it is possible to use the regular syntax for jQuery promises: mw.loader.using( 'ext.pollNY.lightBox' ).done( function () { ... } );
[1] Since 1.23 if you dig git history. There is no mention of when it was added in the documentation.
-Niklas