Custom classes and other attributes can be added to the menu-element and menu-element-item via attributes object. Open dev tools and see added custom attributes