Infusing by element is better, since it avoids the
document.getElementById() lookup and behaves better in case
of duplicate ids (which is invalid HTML, but happens).
This reverts commit
803d89173fc3a56871767663907785cb3eaf7aa5.
Depends on I11fd1c7f2434f904b9ddc94b0903f8278e06f3a1 in OOjs UI.
Bug: T105828
Change-Id: I8c1f5015229db7b8a391f324cfd96be4ac158041
if ( $nodes.length ) {
mw.loader.using( 'mediawiki.widgets' ).done( function () {
$nodes.each( function () {
- OO.ui.infuse( this.id );
+ OO.ui.infuse( this );
} );
} );
}