User:MSchottlender-WMF/test.js

var widget = new OO.ui.ButtonWidget( {	flags: [ 'primary', 'progressive' ],	label: 'Click this!' } ); $( 'div.oouidemo' ).append( widget.$element );

// Set state widget.setLabel( 'Click me again!' ); // Change the label widget.setFlags( { 'primary': false } );

// Events widget.on( 'click', function {	OO.ui.alert( 'Hi there!' ); } );