To preserve legacy compatibility when building the menu from a HTML5 menu element I propose that you check for the existence of the onclick property on the button, menuitem or command tag and if one does not exist then call the root callback function as a fallback:
To preserve legacy compatibility when building the menu from a HTML5 menu element I propose that you check for the existence of the
onclick
property on thebutton
,menuitem
orcommand
tag and if one does not exist then call the root callback function as a fallback:Therefore becomes:
I have no need for legacy compatibility in my app but this works well for me especially when building large menus using the suckerfish methodology.