Pass context to compact_language_links.open hook
Following on from I6fa966c2, fire the mw.uls.compact_language_links.open hook with the $trigger parameter as context for clients to be able to able to distinguish which treatment is visible to the user. Supporting changes: - Note that the hook is unstable next to its callsite Bug: T280770 Change-Id: Ie4bbfea4dc5e36401df587550f466aeae5c8fdcc
This commit is contained in:
@@ -92,7 +92,8 @@ function launchULS( $trigger, languagesObject, forCLS ) {
|
|||||||
onVisible: function () {
|
onVisible: function () {
|
||||||
$trigger.addClass( 'selector-open' );
|
$trigger.addClass( 'selector-open' );
|
||||||
|
|
||||||
mw.hook( 'mw.uls.compact_language_links.open' ).fire();
|
// Note well that this hook is unstable.
|
||||||
|
mw.hook( 'mw.uls.compact_language_links.open' ).fire( $trigger );
|
||||||
},
|
},
|
||||||
languageDecorator: function ( $languageLink, language ) {
|
languageDecorator: function ( $languageLink, language ) {
|
||||||
var element = languagesObject[ language ];
|
var element = languagesObject[ language ];
|
||||||
|
|||||||
Reference in New Issue
Block a user