Returns a new button with the given level and function as an onclick event handler.
document.body.appendChild(mxUtils.button('Test', (evt)=>{ alert('Hello, World!');})); Copy
document.body.appendChild(mxUtils.button('Test', (evt)=>{ alert('Hello, World!');}));
String that represents the label of the button.
Function to be called if the button is pressed.
Optional document to be used for creating the button. Default is the current document.
Returns a new button with the given level and function as an onclick event handler.