Getting a classname from element

Hi All,

is there any way I can print className when I click on element?

For example:
I have created a custom element, I like to get the className from below code

 "custom-task": {
                group: "activity",
                className: "bpmn-icon-end-event-message",
                title: translate("Create Custom Event"),
                action: {
                    click: function(event) {
                        var shape = elementFactory.createShape({
                            type: 'bpmn:EndEvent',
                            eventDefinitionType: 'bpmn:MessageEventDefinition'
                        });
                        create.start(event, shape);
                    },
                    dragstart: function(event) {
                        var shape = elementFactory.createShape({
                            type: 'bpmn:EndEvent',
                            eventDefinitionType: 'bpmn:MessageEventDefinition'
                        });
                        create.start(event, shape);
                    }
                }
            }

Can you explain what you’re generally tryining to achieve?

I have fixed it by passing value as attributes like

eventDefinitionAttrs: { name: 'SendEvent' }

and got the value

with following code:

if (element.businessObject) {
var businessObject = element.businessObject;
if (businessObject.eventDefinitions) {
elementType = businessObject.eventDefinitions[0].$attrs.name;
}
}