Lucas_Werkmeister_WMDE added a comment.

  > However, it is not clear why this should make a difference as our code is 
not supposed to modify `$`, even when called in the global scope.
  
  Well, our own code doesn’t modify it, but `vue2.common.prod.js` does.
  
  name=vue2.common.prod.js (unminified by Firefox DevTools)
    // ...
    var _ = /-(\w)/g,
    b = g(function (e) {
      return e.replace(_, function (e, t) {
        return t ? t.toUpperCase()  : ''
      })
    }),
    $ = g(function (e) {
      return e.charAt(0).toUpperCase() + e.slice(1)
    }),
    w = /\B([A-Z])/g,
    C = g(function (e) {
      return e.replace(w, '-$1').toLowerCase()
    });
    // ...
  
  If the file isn’t transformed into a closure, the assignment in the middle 
overwrites the jQuery `$` global. This would be less of a problem if //other// 
scripts used the usual closure pattern –
  
    ( function ( mw, $ ) {
      // this $ is always window.jQuery
    } )( mediaWiki, jQuery );
  
  – but apparently not all of them do.

TASK DETAIL
  https://phabricator.wikimedia.org/T229390

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Michael, Matthias_Geisler_WMDE, Aklapper, 
darthmon_wmde, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, 
LawExplorer, _jensen, rosalieper, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to