Jump to content

OOUI/Widgets/Progress bars/Example 2

From mediawiki.org

JS

[edit]
// Example: An indeterminate progress bar. 'progress' is set to 'false'.
var progressBar = new OO.ui.ProgressBarWidget( {
		progress: false
	} );
						
$( document.body ).append( progressBar.$element );

PHP

[edit]
use OOUI\ProgressBarWidget;

// Example: An indeterminate progress bar. 'progress' is set to 'false'.
$progressBar = new ProgressBarWidget( [
		'progress' => false
] );

// Append to HTML DOM
$dom = new DOMDocument();
$body = $dom->createElement( 'body', $progressBar );
$dom->appendChild( $body );
echo $dom->saveHTML();