mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 08:20:02 +00:00
Merge "Use DOMCompat::getFirstElementChild() now that it is available from Parsoid"
This commit is contained in:
commit
1fa7271beb
|
@ -54,7 +54,7 @@ class ErrorUtils {
|
||||||
): DocumentFragment {
|
): DocumentFragment {
|
||||||
$extApi->addTrackingCategory( 'cite-tracking-category-cite-error' );
|
$extApi->addTrackingCategory( 'cite-tracking-category-cite-error' );
|
||||||
$fragment = $extApi->createInterfaceI18nFragment( 'cite_error', [ $error ] );
|
$fragment = $extApi->createInterfaceI18nFragment( 'cite_error', [ $error ] );
|
||||||
$fragSpan = DOMCompat::getLastElementChild( $fragment );
|
$fragSpan = DOMCompat::getFirstElementChild( $fragment );
|
||||||
DOMUtils::addAttributes( $fragSpan, [ 'class' => 'error mw-ext-cite-error' ] );
|
DOMUtils::addAttributes( $fragSpan, [ 'class' => 'error mw-ext-cite-error' ] );
|
||||||
return $fragment;
|
return $fragment;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue