[whatwg] Need clarification on menu builder algorithm for contextmenu attribute


I am trying to implement the menu builder algorithm from this part of



I feel the following statement for the third bullet of step 2,

"if the child is a
menu-element> menu element with no
-menu-label> label attribute, Append a separator to the menu, then run the
-builder> menu builder steps using this child
menu-element> menu element for the same menu, then append another separator
to the menu."

is contradicting the statement of step 3

"Remove any submenu with no label, or whose label is the empty string, in
the menu or any submenus."


My understanding  from the first statement is that the any child menu
(submenu) with no label attribute should be flattened. But the subsequent
statement implies removal of whole submenu.


Can someone please explain the difference between the above two statements?


Thanks and regards,

Sanjoy Pal



Received on Tuesday, 26 August 2014 06:33:38 UTC