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

Hi,

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

http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#menu-
builder

 

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

"if the child is a
<http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-
menu-element> menu element with no
<http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr
-menu-label> label attribute, Append a separator to the menu, then run the
<http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#menu
-builder> menu builder steps using this child
<http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-
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